home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_1 / ckit254.zip / CKIT.DOC < prev    next >
Text File  |  1992-12-01  |  186KB  |  4,681 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.                        C-KIT DOOR building Toolkit Library
  14.  
  15.                                   Version 2.54
  16.  
  17.  
  18.  
  19.                                 Reference Manual
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.                                  Distributed By
  30.  
  31.                          Data-Comp Information Systems
  32.                                  P.O. Box 5895
  33.                           Maryville, Tenn. 37802-5895
  34.  
  35.  
  36.                 (615) 982-6512 (USR HST Dual Standard V.32bis)
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.                               Copyright (c) 1989, 90, 91, 92 Rickie W. Belitz
  58.  
  59.  
  60.  
  61.  
  62.                                                               Introduction
  63.  
  64.                                    Introduction
  65.  
  66.        C-KIT Library is an extensive library of C runtime routines that
  67.        allow easy door program implementation using PCBoard 12.0 through
  68.        14.x, WILDCAT! systems, (all versions), GAP BBS, SPITFIRE BBS 3.0
  69.        and other systems using standard DOOR.SYS file along with RBBS-PC,
  70.        QuickBBS, Remote Access and other systems using DORINFOx.DEF files.
  71.        C-KIT 2.01 will also work properly with MikeBBS (MBBS) v9.9 and above.
  72.        CKIT will automatically work with the above system.  For systems
  73.        not listed above, CKIT can deal with them in one of two ways.
  74.        CKIT  can  utilize a file called GENERIC.SYS.    This is for
  75.        creating a system file for a system CKIT does not support. See
  76.        section on GENERIC.SYS for more information.  In addition,
  77.        CKIT will also accept a pointer to a structure that contains the
  78.        needed information for CKIT to operate.  This could be the result
  79.        of your program reading ANY BBS's system file. This structure will
  80.        allow C-KIT to work on ANY BBS system, providing the door author
  81.        reads the BBS file himself.
  82.  
  83.        Some other C-KIT Library's features include interrupt driven I/O,
  84.        16550AN UART support, FOSSIL support, Digiboard Support,provides
  85.        information available from the PCBoard .sys files, database files,
  86.        multi-node support (file sharing), multi-BBS support, local sysop
  87.        function keys and many more utilities are included for the door
  88.        author.
  89.  
  90.        The C-KIT Library routines are written entirely in Assembly language
  91.        using SLR's Optasm.  The routines make use of C library functions
  92.        when possible and are compatible with Microsoft C,  Microsoft QuickC,
  93.        TURBO C, and TURBO C++.
  94.  
  95.        C-KIT Library supports the small, medium and large models.
  96.  
  97.  
  98.        Microsoft is a registered trademark, and QuickC is a trademark of
  99.        the Microsoft Corporation.
  100.  
  101.        TURBO C   is a registered trademark of Borland International Inc.
  102.  
  103.        TURBO C++ is a registered trademark of Borland International Inc.
  104.  
  105.        PCBoard   is a registered trademark of Clark Development Company.
  106.  
  107.        WILDCAT!  is a registered trademark of Mustang Software.
  108.  
  109.        SPITFIRE  is a registered trademark of Buffalo Creek Software
  110.  
  111.        RBBS-PC   is copyright (c) Tom Mack,  Capital PC Software Exchange
  112.  
  113.        QUICKBBS  is copyright (c) Adam Hudson
  114.  
  115.        REMOTE ACCESS is copyright (c) Andrew Milner, Continental Software
  116.  
  117.        MBBS is copyright (c) Mike Anderson
  118.  
  119.        DigiBoard is copyright (c) DigiBoard,  Eden Prarie, MN
  120.  
  121.  
  122.                                                            Registration
  123.  
  124.        The unregistered library will display "Unregistered copy etc." as
  125.        part of the signoff message. The registered version eliminates this
  126.        signoff msg at the time the door is closed.  Please see the
  127.        registration information  below.  A lot of effort has gone into C-KIT,
  128.        to make sure it would operate reliably and with little effort
  129.        on the part of the door author.  If you find the program of use, please
  130.        register it and help support the Shareware method of program
  131.        distribution.   Registering will also help fund further development
  132.        of the libraries.
  133.  
  134.        C-KIT is being distributed as Shareware.
  135.  
  136.        The registration includes:
  137.  
  138.          ∙    A disk with the latest version of C-KIT, registered to you.
  139.  
  140.          .    Some small utility programs for easy door testing w/source.
  141.  
  142.          ∙    Self-Registration program for future releases of C-KIT
  143.  
  144.          ∙    Technical support via electronic mail
  145.  
  146.          .    A LARGE memory model of C-KIT.  (download from Data-Comp BBS)
  147.               (The LARGE model will also work as a HUGE model)
  148.  
  149.          .    Access to source code for reading other system files as they
  150.               become available.  All PCBoard source files are now available.
  151.  
  152.         For more information see the addresses, phone numbers listed
  153.         at the end of this document.
  154.  
  155.                                                           Global Variables
  156.  
  157.              Global Functions/Variable Naming Conventions
  158.  
  159.        The C-KIT Library defines a  number of variables and functions
  160.        in the c-kit header  file.  These have to be made public for
  161.        the linker to be able to resolve references to them.  Beginning
  162.        in C-KIT 2.0 ALL functions/variables available from the library
  163.        begin with the prefix "ck_".  This will help prevent any naming
  164.        conflicts with other globals in your source code.  Knowing that
  165.        all C-KIT's names begin with "ck_", you can prevent any collisions
  166.        with the public names contained in the library.  If this is of
  167.        little concern to you or if you do not like the names used in
  168.        the library because of this, then you can simply re-define
  169.        the names to any name you desire.  OLDCKIT.H does exactly this
  170.        for previous users of the library.  OLDCKIT.H re-defines the
  171.        new names to the old names used in the library.  If you included
  172.        OLDCKIT.H in your present source code, then the new library
  173.        names would work with no other changes to your present source code.
  174.  
  175.        Example:  Name desired   Library Name
  176.        =======  ===========     ============
  177.        #define  s_puts          ck_s_puts
  178.        #define  DUMP_USER       ck_DUMP_USER
  179.        #define  color           ck_color
  180.        #define  newline         ck_newline
  181.        #define  get_cmdline     ck_get_cmdline
  182.  
  183.        These would cause the compiler to reference the new name for all
  184.        references to old name.
  185.               do {
  186.                 color(green);
  187.                 s_puts("Command? ", NULL);
  188.                 get_cmdline();     /* read input into 'cmdline'  */
  189.                 newline();
  190.               } while( (DUMP_USER != TRUE) && ( strlen(cmdline) == 0 ));
  191.  
  192.  
  193.        See OLDCKIT.H and CKITDEMO.C, CKITDEMO.H.
  194.  
  195.        NOTE: The ONLY variable that does not have the "ck_" prefix is
  196.              the progname[]; array name in the CKIT.H file.
  197.  
  198.  
  199.                                                           Global Variables
  200.  
  201.                    Global Variables used by all BBS systems
  202.  
  203.        The C-KIT Library defines a  number of variables in the ckit.h
  204.        header  file.    Through  proper use,  these  variables  allow  the
  205.        programmer  to customize  the C-KIT  Library  functions to  meet
  206.        particular application program's needs.
  207.  
  208.        ck_DUMP_USER
  209.        -------------------------------------------------------------------
  210.        Defined As:    short ck_DUMP_USER;
  211.  
  212.        Description:   This variable will be set if the user hangs up,
  213.                       his/her time runs out, carrier is lost, or if the
  214.                       sysop wants to return the user to the BBS system using
  215.                       function key F8.  You should check this flag in all
  216.                       major loops in the door program.
  217.  
  218.  
  219.        ck_FORCEOFFHOOK
  220.        -------------------------------------------------------------------
  221.        Defined As:    short ck_FORCEOFFHOOK
  222.  
  223.        Description:   This variable should be set to TRUE or FALSE in the
  224.                       CKIT.H file.  If this variable is TRUE, the modem
  225.                       will be placed OFF-HOOK if carrier is dropped in the
  226.                       door before returning to the system.  If FORCEOFFHOOK
  227.                       is false, the door will not take the modem off-hook.
  228.                       See CKIT.H
  229.  
  230.        ck_USERFILE
  231.        -------------------------------------------------------------------
  232.        Defined As:    short ck_USERSFILE
  233.  
  234.        Description:   This variable should be set to TRUE or FALSE in the
  235.                       CKIT.H file.  If this variable is TRUE, C-KIT will
  236.                       open the Users file and those variables will be
  237.                       available.  If not, only the PCBOARD.SYS file will be
  238.                       opened and the user information will not be available.
  239.                       See CKIT.H.
  240.  
  241.        ck_option
  242.        ------------------------------------------------------------------
  243.        Defined As:    unsigned char ck_option;
  244.  
  245.        Description:   This variable is set to indicate how the user was
  246.                       logged off the system.  There are 5 macro's in the
  247.                       CKIT header file that describes each.
  248.  
  249.                         #define     EXITDOOR    0  Normal door exit
  250.                         #define     NOCARRIER   1  Dropped carrier*
  251.                         #define     TIMEOUT     2  Keyboard timeout*
  252.                         #define     SYSOP_O     3  Sysop request*
  253.                         #define     SYSTEMTIME  4  System time expired*
  254.                         #define     LOGOFF      5  User logged off
  255.  
  256.                        * These are normally handled internally by C-KIT
  257.  
  258.                                           COMPATIBILITY   Global Variables
  259.  
  260.        ck_silent               pcboard.sys door.sys wildcat! dorinfox.def
  261.        ------------------------------------------------------------------
  262.        Defined As:    short ck_silent;
  263.  
  264.        Description:   This variable when TRUE will prevent keyboard timeout
  265.                       beeps from being sent to the local console.
  266.                       It can be controlled via your program.
  267.  
  268.        ck_NO_FKEYS             pcboard.sys door.sys wildcat! dorinfox.def
  269.        ------------------------------------------------------------------
  270.        Defined As:    short ck_NO_FKEYS;
  271.  
  272.        Description:   This variable when TRUE will disable the local
  273.                       sysop keyboard F-keys and ALT keys except for
  274.                       ALT-H.  Default is FALSE. (F-keys enabled)
  275.  
  276.        ck_NOSYSTEM             pcboard.sys door.sys wildcat! dorinfox.def
  277.        ------------------------------------------------------------------
  278.        Defined As:    short ck_NOSYSTEM;
  279.  
  280.        Description:   This variable when TRUE will tell open_door()
  281.                       to not attempt a file open but to read it's
  282.                       information from a data structure.  Used for
  283.                       supporting BBS's not supported by C-kit.
  284.                       See open_door() for details.
  285.  
  286.        ck_NO_STATUS                 pcboard.sys door.sys wildcat!
  287.        ------------------------------------------------------------------
  288.        Defined As:    short  ck_NO_STATUS;
  289.  
  290.        Description:   When TRUE, tells CKIT not to create a status line.
  291.                       Must be set to desired state BEFORE open_door() is
  292.                       called.  Once open_door() is called, it cannot be
  293.                       changed.
  294.  
  295.        ck_logoff_color         pcboard.sys door.sys wildcat! dorinfox.def
  296.        ------------------------------------------------------------------
  297.        Defined As:    short ck_logoff_color;
  298.  
  299.        Description:   This variable used to specifiy the color of the
  300.                       exit_msg[] string. (See below).
  301.                       See the ckit.h file for colors available.
  302.  
  303.         Example:      ck_logoff_color = (green).
  304.  
  305.         NOTE:         If not specified, the default color is violet.
  306.  
  307.  
  308.        ck_exit_msg             pcboard.sys door.sys wildcat! dorinfox.def
  309.        ------------------------------------------------------------------
  310.        Defined As:    char  ck_exit_msg[40];
  311.  
  312.        Description:   THIS VARIABLE IS NO LONGER AVAILABLE IN CKIT2.0
  313.                       PLEASE SEE **ck_logoff_msgs.
  314.  
  315.        ck_logoff_msg           pcboard.sys door.sys wildcat! dorinfox.def
  316.        ------------------------------------------------------------------
  317.        Defined As:    char  ck_logoff_msg[40];
  318.  
  319.        Description:   THIS VARIABLE IS NO LONGER AVAILABLE IN CKIT2.0
  320.                       PLEASE SEE **ck_logoff_msgs.
  321.  
  322.                                           COMPATIBILITY   Global Variables
  323.  
  324.        ck_display                         pcboard.sys
  325.        ------------------------------------------------------------------
  326.        Defined As:    short ck_display;
  327.  
  328.        Description:   This variable is set to indicate the status of the
  329.                       local BBS display.
  330.                       file.  TRUE/FALSE   0 = No,  1 = yes.
  331.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  332.  
  333.        ck_printer                         pcboard.sys
  334.        ------------------------------------------------------------------
  335.        Defined As:    short ck_printer;
  336.  
  337.        Description:   This variable is set to indicate the status of the
  338.                       BBS printer.
  339.                       TRUE/FALSE   0 = No,  1 = yes.
  340.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  341.  
  342.        ck_pagebell                        pcboard.sys
  343.        ------------------------------------------------------------------
  344.        Defined As:    short ck_pagebell;
  345.  
  346.        Description:   This variable is set to indicate the status of the
  347.                       BBS pagebell.
  348.                       TRUE/FALSE   0 = No,  1 = yes.
  349.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  350.  
  351.        ck_callalarm                       pcboard.sys
  352.        ------------------------------------------------------------------
  353.        Defined As:    short ck_callalarm;
  354.  
  355.        Description:   This variable is set to indicate the status of the
  356.                       BBS  caller alarm.
  357.                       TRUE/FALSE   0 = No,  1 = yes.
  358.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  359.  
  360.        ck_PCB                   door.sys pcboard.sys wildcat! dorinfx.def
  361.        ------------------------------------------------------------------
  362.        Defined As:    short ck_PCB;
  363.  
  364.        Description:   This variable is set to indicate whether C-KIT found
  365.                       a PCBoard.sys file.
  366.                       TRUE/FALSE   0 = No,  1 = yes.
  367.  
  368.        ck_GAP                   door.sys pcboard.sys wildcat! dorinfx.def
  369.        ------------------------------------------------------------------
  370.        Defined As:    short ck_GAP;
  371.  
  372.        Description:   This variable is set to indicate whether C-KIT found
  373.                       a door.sys file.
  374.                       TRUE/FALSE   0 = No,  1 = yes.
  375.  
  376.        ck_PCB12                 door.sys pcboard.sys wildcat! dorinfx.def
  377.        ------------------------------------------------------------------
  378.        Defined As:    short ck_PCB12;
  379.  
  380.        Description:   This variable is set to indicate whether C-KIT found
  381.                       a PCBoard version 12.0 pcboard.sys file or not.
  382.                       TRUE/FALSE   0 = No,  1 = yes.
  383.  
  384.                                           COMPATIBILITY   Global Variables
  385.  
  386.        ck_WILDCAT               door.sys pcboard.sys wildcat! dorinfx.def
  387.        ------------------------------------------------------------------
  388.        Defined As:    short ck_WILDCAT;
  389.  
  390.        Description:   This variable is set to indicate whether C-KIT found
  391.                       a WILDCAT callinfo.bbs file or not.
  392.                       TRUE/FALSE   0 = No,  1 = yes.
  393.  
  394.        ck_RBBS                  door.sys pcboard.sys wildcat! dorinfx.def
  395.        ------------------------------------------------------------------
  396.        Defined As:    short ck_RBBS;
  397.  
  398.        Description:   This variable is set to indicate whether C-KIT found
  399.                       a RBBS type DORINFOx.DEF file or not.
  400.                       TRUE/FALSE   0 = No,  1 = yes.
  401.  
  402.        ck_GENERIC                                    any BBS system
  403.        ------------------------------------------------------------------
  404.        Defined As:    short ck_GENERIC;
  405.  
  406.        Description:   This variable is set to indicate whether C-KIT found
  407.                       a GENERIC.SYS file.
  408.                       TRUE/FALSE   0 = No,  1 = yes.
  409.  
  410.         If ck_GENERIC is TRUE you, the door author,  should stop and
  411.         ask the user for his/herfirst and last name.
  412.         C-kit no longer does this for you.
  413.           if(GENERIC) {
  414.             sprintf("\nPlease enter first and last name (MAX 25) ->");
  415.             get_cmdline_raw(45);
  416.             strncpy(ck_fullname, cmdline, 25);
  417.         }
  418.  
  419.        ck_FOSSIL                                     any BBS system
  420.        ------------------------------------------------------------------
  421.        Defined As:    short ck_FOSSIL;
  422.  
  423.        Description:   This variable is set to indicate whether a FOSSIL
  424.                       driver is in use.
  425.                       TRUE/FALSE   0 = No,  1 = yes.
  426.  
  427.         You can use this to test for conflicts with your door operations
  428.         that may not support a fossil driver.   For instance in shelling
  429.         out to Zmodem for a file xfer.
  430.  
  431.        ck_Digiboard                                  any BBS system
  432.        ------------------------------------------------------------------
  433.        Defined As:    short ck_Digiboard;
  434.  
  435.        Description:   This variable is set to indicate whether the
  436.                       Digiboard Intelligent Async driver is in use.
  437.                       TRUE/FALSE   0 = No,  1 = yes.
  438.  
  439.         You can use this to test for conflicts with your door operations
  440.         that may not support a Digiboard.    For instance in shelling
  441.         out to Zmodem for a file xfer which doesn't support the Digiboard.
  442.  
  443.                                           COMPATIBILITY   Global Variables
  444.  
  445.        ck_graphics             pcboard.sys door.sys wildcat! dorinfox.def
  446.        ------------------------------------------------------------------
  447.        Defined As:    short ck_graphics;
  448.  
  449.        Description:   This variable is set to indicate the status of the
  450.                       user graphics mode.
  451.                       Supports ANSI X3.64 standard commands.
  452.                       TRUE/FALSE   0 = No,  1 = yes.
  453.  
  454.        ck_non_ibm              pcboard.sys door.sys wildcat! dorinfox.def
  455.        ------------------------------------------------------------------
  456.        Defined As:    short ck_non_ibm;
  457.  
  458.        Description:   This variable is set to indicate whether the caller
  459.                       is using 7 bits instead of 8 bits.  Using 7 bits
  460.                       doesn't allow for IBM graphic characters above
  461.                       128 to be displayed correctly.
  462.                       TRUE/FALSE   0 = No,  1 = yes.
  463.  
  464.        ck_error_connection          pcboard.sys door.sys wildcat!
  465.        ------------------------------------------------------------------
  466.        Defined As:    short ck_error_connection;
  467.  
  468.        Description:   This variable is set to indicate the status of the
  469.                       modem error_connection.
  470.                       TRUE/FALSE   0 = No,  1 = yes.
  471.  
  472.  
  473.  
  474.                                           COMPATIBILITY   Global Variables
  475.  
  476.        ck_local                pcboard.sys door.sys wildcat! dorinfox.def
  477.        ------------------------------------------------------------------
  478.        Defined As:    short ck_local;
  479.  
  480.        Description:   This variable is set to indicate the status of the
  481.                       local/remote operation of door.
  482.                       TRUE/FALSE   0 = No,  1 = yes.
  483.  
  484.        ck_expert                          pcboard.sys door.sys
  485.        ------------------------------------------------------------------
  486.        Defined As:    short ck_expert;
  487.  
  488.        Description:   This variable is set to indicate the status of the
  489.                       expert/novice mode of user.
  490.                       TRUE/FALSE   0 = No,  1 = yes.
  491.  
  492.        ck_event_active                    pcboard.sys
  493.        ------------------------------------------------------------------
  494.        Defined As:    short ck_event_active;
  495.  
  496.        Description:   This variable is set to indicate the status of the
  497.                       system event.
  498.                       TRUE/FALSE   0 = No,  1 = yes.
  499.                       Useful with  14.x pcboard.sys usage only
  500.  
  501.        ck_event_slide                     pcboard.sys
  502.        ------------------------------------------------------------------
  503.        Defined As:    short ck_event_slide;
  504.  
  505.        Description:   This variable is set to indicate whether the system
  506.                       event can be moved or not.
  507.                       TRUE/FALSE   0 = No,  1 = yes.
  508.                       Useful with 14.x pcboard.sys useage only
  509.  
  510.        ck_sysop_next                      pcboard.sys
  511.        ------------------------------------------------------------------
  512.        Defined As:    char  ck_sysop_next[2];
  513.  
  514.        Description:   This C string indicates the status of the
  515.                       Sysop Next flag.  N = sysop next, X = exit to system,
  516.                       space = nothing pending.
  517.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  518.  
  519.        ck_netchat                         pcboard.sys
  520.        ------------------------------------------------------------------
  521.        Defined As:    char  ck_netchat[2];
  522.  
  523.        Description:   This C string indicates the status of the
  524.                       the user's netchat.  U = Unavailable,
  525.                       A = available.
  526.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  527.  
  528.        ck_mem_msg                         pcboard.sys 14.5
  529.        ------------------------------------------------------------------
  530.        Defined As:    long  ck_mem_msg;
  531.  
  532.        Description:   Memorized message pointer.  This is in it's raw
  533.                       form.  To use it, you will need to convert from
  534.                       QBasic single (MKS$) to IEEE long.   Conversion
  535.                       routines are available on the support BBS.
  536.  
  537.                                          COMPATIBILITY   Global Variables
  538.  
  539.        ck_aport                pcboard.sys door.sys wildcat! dorinfox.def
  540.        ------------------------------------------------------------------
  541.        Defined As:    char  ck_aport[2];
  542.  
  543.        Description:   This C string is an ASCII string of the com
  544.                       port in use as determined. (if using a Digiboard
  545.                       it will indicate the port found in the system file)
  546.                       See also ck_port.
  547.  
  548.        ck_bps_open                  pcboard.sys door.sys wildcat!
  549.        ------------------------------------------------------------------
  550.        Defined As:    char  ck_bps_open[6];
  551.  
  552.        Description:   This C string is an ASCII string of the
  553.                       BBS's DTE to modem baud rate.
  554.                       Not available with PCBoard 12.0
  555.  
  556.        ck_baud_rate            pcboard.sys door.sys wildcat! dorinfox.def
  557.        ------------------------------------------------------------------
  558.        Defined As:    char  ck_baud_rate[6];
  559.  
  560.        Description:   This C string is an ASCII string of the
  561.                       callers baud rate. (DCE rate)
  562.  
  563.        ck_uart_base            pcboard.sys door.sys wildcat! dorinfox.def
  564.        ------------------------------------------------------------------
  565.        Defined As:    short ck_uart_base;
  566.  
  567.        Description:   This contains the UART's base address that C-KIT is
  568.                       currently using either as the default or passed
  569.                       by the PORT command.
  570.  
  571.        ck_irq                  pcboard.sys door.sys wildcat! dorinfox.def
  572.        ------------------------------------------------------------------
  573.        Defined As:    short ck_irq;
  574.  
  575.        Description:   This contains the IRQ that C-KIT is
  576.                       currently using either as the default or
  577.                       passed by the PORT command.
  578.  
  579.        ck_firstname            pcboard.sys door.sys wildcat! dorinfox.def
  580.        ------------------------------------------------------------------
  581.        Defined As:    char  ck_firstname[16];
  582.  
  583.        Description:   This C string is an ASCII string of the
  584.                       caller first name.
  585.  
  586.        ck_password                  pcboard.sys door.sys wildcat!
  587.        ------------------------------------------------------------------
  588.        Defined As:    char  ck_password[13];
  589.  
  590.        Description:   This C string is an ASCII string of the
  591.                       caller password.
  592.  
  593.        ck_fullname             pcboard.sys door.sys wildcat! dorinfox.def
  594.        ------------------------------------------------------------------
  595.        defined As:    char  ck_fullname[26];
  596.  
  597.        Description:   This C string is an ASCII string of the
  598.                       caller fullname.
  599.  
  600.                                           COMPATIBILITY   Global Variables
  601.  
  602.        ck_page_length          pcboard.sys door.sys wildcat! dorinfox.def
  603.        ------------------------------------------------------------------
  604.        Defined As:    BYTE  ck_page_length;
  605.  
  606.        Description:   Page length of user.  This information is not
  607.                       available with PCBoard 12.0 so there is a default
  608.                       of 23.  The door author can adjust as desired.
  609.                       This is also used by display_file().  Setting to
  610.                       0 equals continous. (NON-STOP).
  611.  
  612.        ck_language                        pcboard.sys
  613.        ------------------------------------------------------------------
  614.        defined As:    char  ck_language[5];
  615.  
  616.        Description:   This C string is an ASCII string of the
  617.                       caller language.
  618.                       Space = English
  619.  
  620.  
  621.        ck_time_logged               pcboard.sys door.sys wildcat!
  622.        ------------------------------------------------------------------
  623.        defined As:    char  ck_time_logged[6];
  624.  
  625.        Description:   This C string is an ASCII string of the time
  626.                       caller logged onto the BBS.
  627.  
  628.        ck_event_time                      pcboard.sys door.sys
  629.        ------------------------------------------------------------------
  630.        defined As:    char  ck_event_time[6];
  631.  
  632.        Description:   This C string is an ASCII string of the
  633.                       system event time of the BBS as HH:MM.
  634.                       Not available with PCBoard 12.0
  635.  
  636.        ck_time_on                         pcboard.sys
  637.        ------------------------------------------------------------------
  638.        Defined As:    short ck_time_on;
  639.  
  640.        Description:   This variable indicates the time in minutes
  641.                       past midnight the user logged on.
  642.  
  643.        ck_prev_used                       pcboard.sys
  644.        ------------------------------------------------------------------
  645.        Defined As:    short ck_prev_used;      NOTE: N/A for PCBoard 12.0
  646.  
  647.        Description:   This variable indicates the time in minutes
  648.                       used in previous calls today.
  649.  
  650.        ck_user_record               pcboard.sys door.sys wildcat!
  651.        ------------------------------------------------------------------
  652.        Defined As:    unsigned ck_short user_record;
  653.  
  654.        Description:   This variable holds the user record number.
  655.  
  656.        ck_dload_limit                     pcboard.sys
  657.        ------------------------------------------------------------------
  658.        Defined As:    short     ck_dload_limit;
  659.  
  660.        Description:   This variable holds the user's allowed dload Kbytes
  661.                       on the system.
  662.  
  663.                                           COMPATIBILITY   Global Variables
  664.  
  665.        ck_time_limit                      pcboard.sys
  666.        ------------------------------------------------------------------
  667.        Defined As:    short     ck_time_limit;
  668.  
  669.        Description:   This variable holds the user BBS system time limit
  670.                       in minutes.
  671.  
  672.        ck_time_credit                     pcboard.sys
  673.        ------------------------------------------------------------------
  674.        Defined As:    short     ck_time_credit;
  675.  
  676.        Description:   This variable holds the time the user has been given
  677.                       (pos or neg.) that will be added to pcboard.sys when
  678.                       returned to the bulletin board.
  679.  
  680.        ck_time_credit_old                 pcboard.sys
  681.        ------------------------------------------------------------------
  682.        Defined As:    short     ck_time_credit_old;
  683.  
  684.        Description:   This variable holds the time credit in minutes
  685.                       (pos or neg.) that was originally found in the
  686.                       pcboard.sys when the door was opened.  This will
  687.                       be added with the time_credit when the door is
  688.                       closed.
  689.  
  690.        ck_time_added                    pcboard.sys
  691.        ------------------------------------------------------------------
  692.        Defined As:    short     ck_time_added;
  693.  
  694.        Description:   This variable holds the area user time added so
  695.                       far in minutes.
  696.  
  697.        ck_min_left             pcboard.sys door.sys wildcat! dorinfox.def
  698.        ------------------------------------------------------------------
  699.        Defined As:    short     ck_min_left;
  700.  
  701.        Description:   This variable holds the user time left on system
  702.                       at the time the door was opened. (static).
  703.                       If you want the time remaining in the door, you
  704.                       would need to call the mins_left_system() procedure.
  705.  
  706.        ck_min_remaining                                          door.sys
  707.        ------------------------------------------------------------------
  708.        Defined As:    char      ck_min_remaining[6];
  709.  
  710.        Description:   This is the same thing as min_left.  It is
  711.                       available as a string only if door.sys is used.
  712.                       See min_left above. (static)
  713.  
  714.        ck_sec_remaining                                          door.sys
  715.        ------------------------------------------------------------------
  716.        Defined As:    char      ck_sec_remaining[6];
  717.  
  718.        Description:   This variable holds the seconds left on system
  719.                       at the time the door was opened. (static).
  720.                       If you want the time remaining in the door, you
  721.                       would need to call the mins_left_system() procedure.
  722.  
  723.                                           COMPATIBILITY   Global Variables
  724.  
  725.        ck_port                      pcboard.sys door.sys wildcat!
  726.        ------------------------------------------------------------------
  727.        Defined As:    short     ck_port;
  728.  
  729.        Description:   This variable holds the com port in use.
  730.                       Equal to 0 if local mode.  If using a Digiboard
  731.                       it will indicate the Digiboard channel in use.
  732.  
  733.        ck_node[]               pcboard.sys door.sys wildcat! dorinfox.def
  734.        ------------------------------------------------------------------
  735.        Defined As:    char      ck_node[3];    NOTE: N/A for PCBoard 12.0
  736.  
  737.        Description:   This string holds the node in use.
  738.                       Equal to space if no network active.
  739.  
  740.  
  741.        *ck_conferences                  door.sys        wildcat!
  742.        ------------------------------------------------------------------
  743.        Defined As:    char *ck_conferences;
  744.  
  745.        Description:   This a pointer to a string of conferences/forums
  746.                       the user is registered in.
  747.  
  748.        ck_parity                        door.sys wildcat!
  749.        ------------------------------------------------------------------
  750.        Defined As:    short ck_parity;
  751.  
  752.        Description:   Represent the ASCII character of parity in use.
  753.                       Note this NOT a string. It will either be ASCII
  754.                       7 (0x37) or 8 (0x38).
  755.  
  756.        ck_protocol                  pcboard.sys door.sys wildcat!
  757.        ------------------------------------------------------------------
  758.        Defined As:    char ck_protocol[15]
  759.  
  760.        Description:   String containing the users current protocol setting.
  761.                       PCBoard/GAP/SPITFIRE will only list the 1st char. of the
  762.                       protocol, WILDCAT! will give the entire protocol
  763.                       name.
  764.  
  765.        ck_security_level                   door.sys wildcat! dorinfox.def
  766.        ------------------------------------------------------------------
  767.        Defined As:    char ck_security_level[5]
  768.  
  769.        Description:   String containing the users security level.
  770.                       See also ck_user.sec below
  771.  
  772.        ck_current_conf                  door.sys
  773.        ------------------------------------------------------------------
  774.        Defined As:    short ck_current_conf;
  775.  
  776.        Description:   Conference number user just exited from to door.
  777.  
  778.        ck_caller_bday                   door.sys wildcat!
  779.        ------------------------------------------------------------------
  780.        Defined As:    char ck_caller_bday[8];
  781.  
  782.        Description:   String containing the callers birthday.
  783.                       as MM/DD/YY.  Not available with PCBoard systems.
  784.  
  785.                                           COMPATIBILITY   Global Variables
  786.  
  787.        ck_main_dir                      door.sys
  788.        ------------------------------------------------------------------
  789.        Defined As:    char ck_main_dir[80];
  790.  
  791.        Description:   String containing the path to the MAIN directory
  792.                       wherever the users file is located.
  793.  
  794.        ck_gen_dir                       door.sys
  795.        ------------------------------------------------------------------
  796.        Defined As:    char ck_gen_dir[80];
  797.  
  798.        Description:   String containing the path to the GEN directory.
  799.  
  800.  
  801.        ck_sysop_name                    door.sys dorinfox.def
  802.        ------------------------------------------------------------------
  803.        Defined As:    char ck_sysop_name[15];
  804.  
  805.        Description:   String containing the sysop's first name.
  806.  
  807.        ck_sysop_alias                   door.sys
  808.        ------------------------------------------------------------------
  809.        Defined As:    char ck_sysop_alias[15];
  810.  
  811.        Description:   String containing the sysop's alias name.
  812.  
  813.        ck_ansi_ng                       door.sys
  814.        ------------------------------------------------------------------
  815.        Defined As:    short ck_ansi_ng;
  816.  
  817.        Description:   ANSI supported and caller using NG mode.
  818.                       TRUE/FALSE   0 = No,  1 = yes.
  819.  
  820.        ck_record_lock                   door.sys
  821.        ------------------------------------------------------------------
  822.        Defined As:    short ck_record_lock;
  823.  
  824.        Description:   User record locking.
  825.                       TRUE/FALSE   0 = No,  1 = yes.
  826.  
  827.        ck_default_color                 door.sys
  828.        ------------------------------------------------------------------
  829.        Defined As:    char ck_default_color[2];
  830.  
  831.        Description:   String containing system's default color
  832.  
  833.        ck_last_called                   door.sys
  834.        ------------------------------------------------------------------
  835.        Defined As:    char ck_last_called[6];
  836.  
  837.        Description:   String containing user last time called.
  838.                       HH:MM.
  839.  
  840.        ck_last_file_scan                door.sys wildcat!
  841.        ------------------------------------------------------------------
  842.        Defined As:    char ck_last_file_scan[9];
  843.  
  844.        Description:   String containing user last new files scan as
  845.                       MM/DD/YY.
  846.  
  847.                                           COMPATIBILITY   Global Variables
  848.  
  849.        ck_daily_files                   door.sys wildcat!
  850.        ------------------------------------------------------------------
  851.        Defined As:    char ck_daily_files[4];
  852.  
  853.        Description:   String containing number of files user has download
  854.                       so far today.
  855.  
  856.        ck_daily_bytes                   door.sys wildcat!
  857.        ------------------------------------------------------------------
  858.        Defined As:    char ck_daily_bytes[4];
  859.  
  860.        Description:   String containing number of K bytes user downloaded
  861.                       so far today.
  862.  
  863.        ck_total_doors                   door.sys
  864.        ------------------------------------------------------------------
  865.        Defined As:    char ck_total_doors[4];
  866.  
  867.        Description:   String containing number of doors user has opened.
  868.  
  869.        ck_msgs_left                     door.sys
  870.        ------------------------------------------------------------------
  871.        Defined As:    char ck_msgs_left[4];
  872.  
  873.        Description:   String containing total number of messages left by
  874.                       user.
  875.  
  876.        ck_max_files                       door.sys
  877.        ------------------------------------------------------------------
  878.        Defined As:    char ck_max_files[4];
  879.  
  880.        Description:   String containing Max. number of files allowed.
  881.  
  882.        ck_upload_Kbytes                   door.sys
  883.        ------------------------------------------------------------------
  884.        Defined As:    char ck_upload_Kbyte[10];
  885.  
  886.        Description:   String containing total "K" bytes uploaded.
  887.  
  888.        ck_download_Kbytes                   door.sys wildcat!
  889.        ------------------------------------------------------------------
  890.        Defined As:    char ck_download_Kbyte[10];
  891.  
  892.        Description:   String containing total "K" bytes downloaded.
  893.  
  894.        ck_dload_total                        door.sys wildcat!
  895.        ------------------------------------------------------------------
  896.        Defined As:    char ck_dload_total[5];
  897.  
  898.        Description:   String containing total files downloaded.
  899.  
  900.        ck_upload_total                      door.sys wildcat!
  901.        ------------------------------------------------------------------
  902.        Defined As:    char ck_upload_total[5];
  903.  
  904.        Description:   String containing total files uploaded.
  905.  
  906.                                           COMPATIBILITY   Global Variables
  907.  
  908.        ck_monitor_type                               wildcat!
  909.        ------------------------------------------------------------------
  910.        Defined As:    char ck_monitor_type[5];
  911.  
  912.        Description:   String containing monitor type MONO/COLOR
  913.                       NOTE: C-KIT will set graphics true/false
  914.                       depending on this setting. see Graphics above.
  915.  
  916.        ck_max_sec                                    wildcat!
  917.        ------------------------------------------------------------------
  918.        Defined As:    char ck_max_sec[5];
  919.  
  920.        Description:   String containing a systems maximum user
  921.                       security level for WILDCAT! systems.
  922.  
  923.  
  924.        ck_high_msg                                   wildcat!
  925.        ------------------------------------------------------------------
  926.        Defined As:    char ck_high_msg[10]
  927.  
  928.        Description:   String containing the users highest message
  929.                       read.
  930.  
  931.        ck_name_in_use                                wildcat!
  932.        ------------------------------------------------------------------
  933.        Defined As:    BYTE ck_name_in_use
  934.  
  935.        Description:   Set to TRUE/FALSE. This is called already_connected
  936.                        in the WILDCAT def. file.
  937.        ck_door_opened                                wildcat!
  938.        ------------------------------------------------------------------
  939.        Defined As:    short ck_door_opened
  940.  
  941.        Description:   Which door was opened to run your door.
  942.  
  943.        ck_BBSname                                    dorinfox.def
  944.        ------------------------------------------------------------------
  945.        Defined As:    char ck_BBSname[63];
  946.  
  947.        Description:   Name of the BBS system running the door.
  948.  
  949.        ck_pcbsysbuf                                  pcboard.sys
  950.        ------------------------------------------------------------------
  951.        Defined As:    BYTE    *ck_pcbsysbuf;
  952.  
  953.        Description:   This is a pointer to the buffer holding the
  954.                       pcboard.sys file read.  This buffer will be
  955.                       written back to pcboard.sys when close_door()
  956.                       is called.  It is provided so a door author
  957.                       can manipulate any byte in the pcboard.sys
  958.                       file and will in turn be written back to the
  959.                       pcboard.sys file.
  960.  
  961.                                                           Global Variables
  962.  
  963.        These are part of the structure "ck_user" as defined in the CKIT.H file.
  964.        All these user structure members are available only if the door author
  965.        specifies USERFILES True (see above) and the system is PCBoard version
  966.        14.x.  Some but not all members are available if the author specifies
  967.        USERFILE True and used with Pcboard version 12.0.  If the door author
  968.        does not specify USERFILE's file TRUE, then do not use this structure.
  969.  
  970.        If you plan on using this structure and/or update_user(), you
  971.        must using WORD alignment when compiling your door program for
  972.        CKIT < version 2.0.  For CKIT versions 2.0 and greater, you must
  973.        use BYTE alignment.
  974.  
  975.        ck_user.name   See also fullname
  976.        ------------------------------------------------------------------
  977.        Defined As:    char    ck_user.name[26];
  978.  
  979.        Description:   This C string is an ASCII string of the
  980.                       caller's fullname.
  981.  
  982.        ck_user.city
  983.        ------------------------------------------------------------------
  984.        Defined As:    char    ck_user.city[25];
  985.  
  986.        Description:   This C string is an ASCII string of the
  987.                       caller's city, state.
  988.  
  989.        ck_user.pwrd
  990.        ------------------------------------------------------------------
  991.        Defined As:    char    ck_user.pwrd[13];
  992.  
  993.        Description:   This C string is an ASCII string of the
  994.                       caller's password.
  995.  
  996.        ck_user.bphone
  997.        ------------------------------------------------------------------
  998.        Defined As:    char    ck_user.bphone[14];
  999.  
  1000.        Description:   This C string is an ASCII string of the caller's
  1001.                       business phone number.
  1002.  
  1003.        ck_user.phone
  1004.        ------------------------------------------------------------------
  1005.        Defined As:    char    ck_user.phone[14];
  1006.  
  1007.        Description:   This C string is an ASCII string of the caller's
  1008.                       home phone number.
  1009.  
  1010.        ck_user.last_date
  1011.        ------------------------------------------------------------------
  1012.        Defined As:    char    ck_user.last_date[7];
  1013.  
  1014.        Description:   This C string is an ASCII string of the caller's
  1015.                       last date on system.
  1016.                       Format is YYMMDD
  1017.  
  1018.  
  1019.                                                           Global Variables
  1020.  
  1021.         These are part of the structure "ck_user" as defined in the
  1022.         CKIT.H file.  Information available from user file.
  1023.  
  1024.        ck_user.last_time
  1025.        ------------------------------------------------------------------
  1026.        Defined As:    char    ck_user.last_time[6];
  1027.        Description:   This C string is an ASCII string of the caller's
  1028.                       last time on system.
  1029.                       Format is HH:MM
  1030.  
  1031.        ck_user.expert     See also expert above
  1032.        ------------------------------------------------------------------
  1033.        Defined As:    char    user.expert[2];
  1034.  
  1035.        Description:   This C string is an ASCII string of the caller
  1036.                       expert mode ( Y or N )
  1037.  
  1038.        ck_user.protocol
  1039.        ------------------------------------------------------------------
  1040.        Defined As:    char    ck_user.protocol[2];
  1041.  
  1042.        Description:   This C string is an ASCII string of the caller
  1043.                       protocol type in effect.
  1044.  
  1045.        ck_user.packed_byte
  1046.        ------------------------------------------------------------------
  1047.        Defined As:    BYTE    ck_user.packed_byte;
  1048.  
  1049.        Description:   This holds the PCBoard packed byte to indicate
  1050.                       various user options in the user file.
  1051.  
  1052.        ck_user.filedate                         see also _last_file_scan
  1053.        ------------------------------------------------------------------
  1054.        Defined As:    char    ck_user.filedate[7];
  1055.  
  1056.        Description:   This C string is an ASCII string of the caller
  1057.                       last DIR scan. in YYMMDD format
  1058.  
  1059.        ck_user.security
  1060.        ------------------------------------------------------------------
  1061.        Defined As:    BYTE   ck_user.security;
  1062.  
  1063.        Description:   This variable holds the user security level as
  1064.                       determined from USER file.
  1065.  
  1066.        ck_user.total_calls
  1067.        ------------------------------------------------------------------
  1068.        Defined As:    short     ck_user.total_calls;
  1069.  
  1070.        Description:   This variable holds the user total calls on system.
  1071.  
  1072.        ck_user.page_length        see also page_length
  1073.        ------------------------------------------------------------------
  1074.        Defined As:    BYTE      ck_user.page_length;
  1075.  
  1076.        Description:   This variable holds the user page setting.
  1077.  
  1078.        ck_user.uploads             see also upload_total
  1079.        ------------------------------------------------------------------
  1080.        Defined As:    short     ck_user.uploads;
  1081.        Description:   This variable holds the user total uploads.
  1082.  
  1083.                                                           Global Variables
  1084.  
  1085.         These are part of the structure "ck_user" as defined in the
  1086.         CKIT.H file.  Information available from user file.
  1087.  
  1088.        ck_user.downloads           see also dload_total
  1089.        ------------------------------------------------------------------
  1090.        Defined As:    short     ck_user.downloads;
  1091.  
  1092.        Description:   This variable holds the user total downloads.
  1093.  
  1094.        ck_user.dload_bytes          see also dload_total
  1095.        ------------------------------------------------------------------
  1096.        Defined As:    double    ck_user.dload_bytes;
  1097.  
  1098.        Description:   This variable holds the user total DAILY
  1099.                       downloaded bytes determined from USER file.
  1100.                       This variable is in it's raw Qbasic MKD$.
  1101.                       To be of use to C, it needs to be converted
  1102.                       from QBASIC real to C's IEEE float.
  1103.                       The conversion routines/examples are available from
  1104.                       the support BBS. Before changing this variable
  1105.                       it should also be converted back to a QBASIC real.
  1106.  
  1107.        ck_user.comment1
  1108.        ------------------------------------------------------------------
  1109.        Defined As:    char    ck_user.comment1[31];
  1110.  
  1111.        Description:   This C string is an ASCII string of the caller
  1112.                       user maintained comment.
  1113.  
  1114.        ck_user.comment2
  1115.        ------------------------------------------------------------------
  1116.        Defined As:    char    ck_user.comment2[32];
  1117.  
  1118.        Description:   This C string is an ASCII string of the caller
  1119.                       sysop maintained comment.
  1120.  
  1121.        ck_user.time_used
  1122.        ------------------------------------------------------------------
  1123.        Defined As:    short   ck_user.time_used;
  1124.  
  1125.        Description:   Elapsed time on system. (minutes)
  1126.  
  1127.        ck_user.expire_date
  1128.        ------------------------------------------------------------------
  1129.        Defined As:    char    ck_user.expire_date[7];
  1130.  
  1131.        Description:   This C string is an ASCII string of the caller
  1132.                       expiration date in YYMMDD format.
  1133.  
  1134.        ck_user.expire_level
  1135.        ------------------------------------------------------------------
  1136.        Defined As:    BYTE    ck_user.expire_level;
  1137.  
  1138.        Description:   This is the users expired security level read
  1139.                       from pcboard users file.
  1140.  
  1141.                                                           Global Variables
  1142.  
  1143.         These are part of the structure "ck_user" as defined in the
  1144.         CKIT.H file.  Information available from user file.
  1145.  
  1146.        ck_user.current_conf
  1147.        ------------------------------------------------------------------
  1148.        Defined As:    BYTE    ck_user.current_conf;
  1149.  
  1150.        Description:   This is the last conference user was in read
  1151.                       from pcboard users file.
  1152.  
  1153.        ck_user.conferences
  1154.        ------------------------------------------------------------------
  1155.        Defined As:    BYTE    ck_user.conferences[6]
  1156.  
  1157.        Description:   This is 5 bytes containing the Bitmaps of the
  1158.                       conferences the user is registered in.
  1159.                       They are in their "raw" form and will have to
  1160.                       be decoded before used and encoded before
  1161.                       storing.  Routines are available from the
  1162.                       support BBS.
  1163.  
  1164.        ck_user.expire_conf
  1165.        ------------------------------------------------------------------
  1166.        Defined As:    BYTE    ck_user.expire_conf[6]
  1167.  
  1168.        Description:   This is 5 bytes containing the Bitmaps of the
  1169.                       conferences the user is registered in after
  1170.                       his/her expiration date.
  1171.                       They are in their "raw" form and will have to
  1172.                       be decoded before used and encoded before
  1173.                       storing.  Routines are available from the
  1174.                       support BBS.
  1175.  
  1176.        ck_user.scan_conf
  1177.        ------------------------------------------------------------------
  1178.        Defined As:    BYTE    ck_user.scan_conf[6]
  1179.  
  1180.        Description:   This is 5 bytes containing the Bitmaps of the
  1181.                       conferences the user is registered in and
  1182.                       desires a mail scan.
  1183.                       They are in their "raw" form and will have to
  1184.                       be decoded before used and encoded before
  1185.                       storing.  Routines are available from the
  1186.                       support BBS.
  1187.  
  1188.        ck_user.dload_total          see also dload_total
  1189.        ------------------------------------------------------------------
  1190.        Defined As:    double    ck_user.dload_total
  1191.  
  1192.        Description:   This variable holds the user total downloaded
  1193.                       bytes determined from USER file.  This variable
  1194.                       is in it's raw Qbasic MKD$.  To be of use to
  1195.                       C, it needs to be converted from QBASIC real
  1196.                       to C's IEEE float.  The conversion/example routines
  1197.                       are available from the support BBS. Before changing
  1198.                       this variable it should also be converted back to a
  1199.                       QBASIC real.
  1200.  
  1201.                                                           Global Variables
  1202.  
  1203.         These are part of the structure "ck_user" as defined in the
  1204.         CKIT.H file.  Information available from user file.
  1205.  
  1206.        ck_user.upload_total         see also dload_total
  1207.        ------------------------------------------------------------------
  1208.        Defined As:    double    ck_user.upload_total;
  1209.  
  1210.        Description:   This variable holds the user total uploaded
  1211.                       bytes determined from USER file.  This variable
  1212.                       is in it's raw Qbasic MKD$.  To be of use to
  1213.                       C, it needs to be converted from QBASIC real
  1214.                       to C's IEEE float.  The conversion/example routines
  1215.                       are available from the support BBS. Before changing
  1216.                       this variable it should also be converted back to a
  1217.                       QBASIC real.
  1218.  
  1219.        ck_user.delete_user
  1220.        ------------------------------------------------------------------
  1221.        Defined As:    char    ck_user.delete_user[2];
  1222.  
  1223.        Description:   This C string is an ASCII string of delete
  1224.                       user flag. (Y or N)
  1225.  
  1226.  
  1227.        ck_user.last_msg_read        see also dload_total
  1228.        ------------------------------------------------------------------
  1229.        Defined As:    long   ck_user.last_msg_read;
  1230.  
  1231.        Description:   This variable holds the user last message read
  1232.                       in the main conference.  This variable
  1233.                       is in it's raw Qbasic MKS$.  To be of use to
  1234.                       C, it needs to be converted from QBASIC real
  1235.                       to C's IEEE float.  The conversion/example routines
  1236.                       are available from the support BBS. Before changing
  1237.                       this variable it should also be converted back to a
  1238.                       QBASIC real.
  1239.  
  1240.        ck_user.last_read            see also dload_total
  1241.        ------------------------------------------------------------------
  1242.        Defined As:    long      ck_user.last_read[39]
  1243.  
  1244.        Description:   This variable array contains the  last
  1245.                       read message pointers for conferences 0-39.
  1246.                       They are in raw Qbasic MKS$.  To be of use to
  1247.                       C, it needs to be converted from QBASIC real
  1248.                       to C's IEEE float.  The conversion/example routines
  1249.                       are available from the support BBS. Before changing
  1250.                       this variable it should also be converted back to a
  1251.                       QBASIC real.
  1252.  
  1253.                                                  System  Global Variables
  1254.  
  1255.         These variables are available with any BBS system.  Some are used
  1256.         for customization of your door program and MUST be defined.
  1257.         Others using are meant to be read only variables available globally.
  1258.         Some are are used in conjuction with high level functions as noted.
  1259.  
  1260.        char     progname[]         pcboard.sys door.sys wildcat! generic
  1261.        ------------------------------------------------------------------
  1262.        Defined as:    char   progname[21];
  1263.  
  1264.        Description:   Set this to your Door program name.  It will be
  1265.                       display on the status line on the sysop screen.
  1266.                       MAXIMUM length is 20 characters! Do not exceed this!
  1267.  
  1268.        NOTE: THIS IS NOT AN OPTION. You must define progname[] even if
  1269.              you do not plan on using it.
  1270.  
  1271.        ck_cmdline[]                 pcboard.sys door.sys wildcat! generic
  1272.        ------------------------------------------------------------------
  1273.        Defined as:    BYTE    ck_cmdline[128]
  1274.  
  1275.        Description:   This is used by get_cmdline(), to read the user
  1276.                       keyboard input to.
  1277.                       Please see the CKITDEMO.C for usage.
  1278.  
  1279.        See Also:      ck_get_cmdline();
  1280.  
  1281.        ck_par[]                     pcboard.sys door.sys wildcat! generic
  1282.        ------------------------------------------------------------------
  1283.        Defined as:    char    ck_par[128];
  1284.  
  1285.        Description:   This is used by get_nextpar(), to parse stacked
  1286.                       commands to.
  1287.                       Please see CKITDEMO.C for usage.
  1288.  
  1289.        See Also:      ck_get_cmdline(), ck_get_nextpar();
  1290.  
  1291.        ck_scan_code                 pcboard.sys door.sys wildcat! generic
  1292.        ------------------------------------------------------------------
  1293.        Defined as:    size_t  ck_scan_code;
  1294.  
  1295.        Description:   This variable will if NONZERO  contain the key_code
  1296.                       of any NON-STANDARD keys on the IBM keyboard.
  1297.                       (F1-F10, PgDn, PgUp etc).  The remote user must be
  1298.                       in some type of terminal program that will allow
  1299.                       passing the keycodes.  Qmodem in "DOORWAY" mode
  1300.                       is one example.
  1301.                       Please see ck_input(), ck_get_cmdline() and
  1302.                       ckitdemo.c for examples.
  1303.  
  1304.        See Also:      ck_get_cmdline();
  1305.  
  1306.         ck_key_source               pcboard.sys door.sys wildcat! generic
  1307.        ------------------------------------------------------------------
  1308.        Defined as:    short   ck_key_source;
  1309.  
  1310.        Description:   This variable will a 1 if the input from get_cmdline()
  1311.                       came from the LOCAL console or a 2 if it came from
  1312.                       a REMOTE console.
  1313.  
  1314.        See Also:      ck_get_cmdline(), ck_input()
  1315.  
  1316.                                                  System  Global Variables
  1317.  
  1318.         ck_linenum                  pcboard.sys door.sys wildcat! generic
  1319.        ------------------------------------------------------------------
  1320.        Defined as:    short   ck_linenum;
  1321.  
  1322.        Description:   This variable be will incremented each time a call
  1323.                       to newline() is made.
  1324.  
  1325.  
  1326.        See Also:      ck_page_length, ck_newline()
  1327.  
  1328.  
  1329.        ck_logoff_msgs               pcboard.sys door.sys wildcat! generic
  1330.        ------------------------------------------------------------------
  1331.        Defined as:    char    **ck_logoff_msgs;
  1332.  
  1333.     Description:
  1334.     This is pointer to an array of pointers that will be printed at the
  1335.     time the door is closed.  The array of pointers has a length of 6
  1336.     elements. Which message is printed depends on the value of ck_option.
  1337.     The code looks for an array of pointers to the exit messages and uses
  1338.     the ck_option variable to pick which one to print.    This pointer to
  1339.     the array of pointers allows you to define your own array of pointers
  1340.     to the 6 exit messages.  This allows the messages to be of any length
  1341.     and which message printed will be based on the value of ck_option (0-5)
  1342.     respectfully.  See also the variable ck_option.
  1343.     They must be in this order.
  1344.  
  1345.     Example to create your own log off messages of ANY size.
  1346.     In your source code:
  1347.  
  1348.         char    option0[] = "New Returning to system msg, any size\n";
  1349.         char    option1[] = "New CARRIER DROPPED! msg, any size\n";
  1350.         char    option2[] = "New Keyboard Timeout! msg, any size\n";
  1351.         char    option3[] = "New Sysop requests return to BBS msg, any size\n";
  1352.         char    option4[] = "New System time has expired! msg, any size\n";
  1353.         char    option5[] = "New Thanks for calling! msg, any size";
  1354.  
  1355.         static  char    *logoffs[6] = {         /* create array of ptrs */
  1356.                 option0,
  1357.                 option1,
  1358.                 option2,
  1359.                 option3,
  1360.                 option4,
  1361.                 option5,
  1362.         };
  1363.  
  1364.     ck_logoff_msgs = &logoffs[0]; /* Set C-KIT's pointer to custom messages*/
  1365.  
  1366.                                                  System  Global Variables
  1367.  
  1368.        ck_logoff_msgs  <cont.>
  1369.        ------------------------------------------------------------------
  1370.  
  1371.       You do NOT have to define your own log off messages.  C-KIT has
  1372.     it's own internal defaults.  If you want to change just one individual
  1373.     log off message and leave the rest alone, then you can use the pointer
  1374.     that is initially contained in **ck_logoff_msgs and index to the one
  1375.     you want to change.  Doing this will limit the size to the max.
  1376.     indicated for that message.  The limits on changing individual logoff
  1377.     internal library messages are:
  1378.  
  1379.         MAX SIZE!
  1380.         ========
  1381.         option0[40] /* internal "returning to board" msg  */
  1382.         option1[16] /* internal "NO CARRIER!!"       msg  */
  1383.         option2[40] /* internal "keyboard timeout"   msg  */
  1384.         option3[48] /* internal "sysop request"      msg  */
  1385.         option4[36] /* internal "time expired"       msg  */
  1386.         option5[40] /* internal "goodbye"            msg  */
  1387.  
  1388.  
  1389.     To change only one internal logoff library message, use the pointer
  1390.     that is originally contained in **ck_logoff_msgs.  Indexing from it,
  1391.     you can use strcpy() to change it.  EXAMPLE:
  1392.  
  1393.     To change only the "returning to board" msg.
  1394.  
  1395. IN YOUR source code:
  1396. char exit_msg[40] = "Returning to system\n";  /* Max 40 allocated in lib */
  1397. strcpy(*(ck_logoff_msgs), exit_msg);   /* Using the orignal pointer,
  1398.                                           copy new string */
  1399.  
  1400.     To change only the "goodbye" msg.
  1401.  
  1402. IN YOUR source code:
  1403. char logoff_msg[40] = "Thanks for calling\n";  /* Max 40 allocated in lib  */
  1404. strcpy(*(ck_logoff_msgs + 5), logoff_msg);     /* Use the original pointer */
  1405.  
  1406.     Again, you can provide your own array of pointers and change  all
  1407.     the messages to any size desired.  Look at the ckitdemo.c, ckitdemo.h.
  1408.  
  1409.                                                  System  Global Variables
  1410.  
  1411.        ck_gen_msgs                  pcboard.sys door.sys wildcat! generic
  1412.        ------------------------------------------------------------------
  1413.        defined as:    char    **ck_gen_msgs;
  1414.  
  1415.        Description:
  1416.  
  1417.     This is pointer to an array of pointers that are C-KIT's internal
  1418.     messages. The array of pointers has a length of 12 elements.
  1419.     The code looks for an array of pointers to index which message to
  1420.     print.  This pointer to the general array of pointers allows you to
  1421.     define your own array of pointers to the 12 internal messages.  The
  1422.     messages can be of any length and which  message printed will be based
  1423.     their position in the array.
  1424.     The ordering of the array is -
  1425.  
  1426.  0  -  Screen display on message
  1427.  1  -  Event pending warning, time adjusted
  1428.  2  -  Press enter to continue message, used with FORCE_ENTER.
  1429.  3  -  Sysop chat active msg
  1430.  4  -  Sysop chat end msg
  1431.  5  -  Sysop exited to DOS msg
  1432.  6  -  Sysop back from DOS msg
  1433.  7  -  (Enter=none)? msg used in get_defn() and get_defen()
  1434.  8  -  (Enter=yes)   msg used in get_defyn()
  1435.  9  -  (Enter=no)    msg used in get_defyn()
  1436.  10 -  (Enter) or (Y)es, (N)o, (NS)nonstop? msg used in no_more & display_file
  1437.  11 -  More:   - msg used in no_more and display_file
  1438.  
  1439.     ck_gen_msgs = &ckitmsgs[0];   /* Set pointer to custom message ptrs */
  1440.  
  1441.     You do NOT have to define these  messages.  C-KIT has it's own internal
  1442.     defaults.  If you want to change just one individual message and
  1443.     leave the rest alone, then you can use the pointer  that is initially
  1444.     contained in **ck_gen_msgs and index to the one you want to change.
  1445.     Doing this will limit the size to the max. indicated for that message.
  1446.     The limits on changing individual general internal library messages are:
  1447.  
  1448.         MAX SIZE!
  1449.         ========
  1450.         msg0[18]  /* internal "Screen on"        msg   */
  1451.         msg1[44]  /* internal "Event pending"    msg   */
  1452.         msg2[28]  /* internal "Enter to cont."   msg   */
  1453.         msg3[48]  /* internal "Sysop Chat"       msg   */
  1454.         msg4[18]  /* internal "Chat end"         msg   */
  1455.         msg5[42]  /* internal "Exit to DOS"      msg   */
  1456.         msg6[40]  /* internal "Return from DOS"  msg   */
  1457.         msg7[14]  /* internal "prompt1"          msg   */
  1458.         msg8[12]  /* internal "prompt2"          msg   */
  1459.         msg9[10]  /* internal "prompt3"          msg   */
  1460.         msg10[38] /* internal "prompt4"          msg   */
  1461.         msg11[6]  /* internal "More:  "          msg   */
  1462.  
  1463.                                                  System  Global Variables
  1464.        ck_gen_msgs  <cont.>
  1465.        ------------------------------------------------------------------
  1466.  
  1467.     To change only one internal general library message, use the pointer
  1468.     that is originally contained in **ck_gen_msgs.  Indexing from it,
  1469.     you can use strcpy() to change it.  EXAMPLE:
  1470.  
  1471.     To change only the "Screen display on" msg.
  1472.  
  1473. IN YOUR source code:
  1474. char display_msg[18] = "<Screen ON>";  /* Max 18 allocated in lib */
  1475. strcpy(*(ck_gen_msgs), display_msg);   /* Using the orignal pointer,
  1476.                                           copy new string */
  1477.  
  1478.     To change only the "Exited to DOS" msg.
  1479.  
  1480. IN YOUR source code:
  1481. char dos_ret_msg[42] = "Sysop exited to DOS\n";  /* Max 42 allocated in lib  */
  1482. strcpy(*(ck_gen_msgs + 6), dos_ret_msg);         /* Use the original pointer */
  1483.  
  1484.     Again, you can provide your own array of pointers and change  all
  1485.     the messages to any size desired.  Look at the ckitdemo.c, ckitdemo.h.
  1486.  
  1487.  
  1488.  
  1489.        ck_system_time_HHMMSS[]      pcboard.sys door.sys wildcat! generic
  1490.        ------------------------------------------------------------------
  1491.        Defined as:    char    ck_system_time_HHMMSS[9];
  1492.  
  1493.        Description:   This string will contain the current system time
  1494.                       in the form HH:MM:SS and is available for general use.
  1495.  
  1496.  
  1497.        ck_todays_date_MMDDYY[]      pcboard.sys door.sys wildcat! generic
  1498.        ------------------------------------------------------------------
  1499.        Defined as:    char    ck_todays_date_MMDDYY[9];
  1500.  
  1501.        Description:   This string will contain the current system date
  1502.                       in the form MM:DD:YY and is available for general use.
  1503.  
  1504.  
  1505.        ck_error_msg11[]             pcboard.sys door.sys wildcat! generic
  1506.        ------------------------------------------------------------------
  1507.        Defined as:    char    ck_error_msg11[40];
  1508.  
  1509.        Description:   Error message used by display_file.  If you do not
  1510.                       define this, C-KIT will default to it's standard
  1511.                       error message.  MAX. 40 chars. (not including NULL).
  1512.  
  1513.        ck_chatmode                  pcboard.sys door.sys wildcat! generic
  1514.        ------------------------------------------------------------------
  1515.        Defined as:    short   ck_chatmode;
  1516.  
  1517.        Description:   This variable will a 1 (TRUE) if chat mode or a
  1518.                       sysop drop to DOS has been active.  Use this to
  1519.                       re-fresh your screen if needed. It is YOUR responsiblity
  1520.                       to de-assert the variable after you have used it.
  1521.                       (set to FALSE)
  1522.  
  1523.                                                  System  Global Variables
  1524.        ck_DOTS
  1525.        ------------------------------------------------------------------
  1526.        Defined as:    BYTE   ck_DOTS;
  1527.  
  1528.        Description:   This variable when set to a non-zero value will
  1529.                       echo that value (character) to the to the remote/
  1530.                       local screens when using input() or get_cmdline().
  1531.                       For instance, setting ck_DOTS to a '.' will cause
  1532.                       dots to be echoed to the screen.  Handy for using
  1533.                       with passwords etc.  Resetting back to a NULL will
  1534.                       resume normal operations.
  1535.  
  1536.  
  1537.  
  1538.                                                        Standard Data Types
  1539.  
  1540.                                Standard Data Types
  1541.  
  1542.        CKIT.H  defines a number of useful data types.
  1543.  
  1544.        BYTE
  1545.        -------------------------------------------------------------------
  1546.        Defined As:    typedef unsigned char  BYTE;
  1547.  
  1548.        Description:   The  BYTE data type is useful in serial communications
  1549.                       since it provides an easier and more logical way of
  1550.                       handling 8 bit data from UART's used in serial
  1551.                       communications.
  1552.  
  1553.  
  1554.  
  1555.  
  1556.                                                                  Functions
  1557.  
  1558.                                     Functions
  1559.  
  1560.        The  C-KIT Library contains a variety  of functions.
  1561.        They are described as follows:
  1562.  
  1563.        Summary:       Presents  an exact syntactic  model for each  of the
  1564.                       C-KIT Library functions.
  1565.  
  1566.        Description:   Describes a function's purpose and how it is used in
  1567.                       an application program.
  1568.  
  1569.        Return Value:  Explains  any of the  possible return values  for a
  1570.                       C-KIT Library function.
  1571.  
  1572.        See Also:      Lists any similar or related C-KIT Library  function.
  1573.  
  1574.        Example:       Illustrates how  a  C-KIT Library  function could
  1575.                       actually be used in an application program.
  1576.                       Most function listed in the examples will be simply
  1577.                       listed as function().  This may not indicate how
  1578.                       they are called.  To see how they are prototyped and
  1579.                       called go to that function's page.
  1580.                       I.E. If open_door is used in an example (other than
  1581.                       it's own example) it may be simply refered to as
  1582.                       open_door().
  1583.                       In reality open_door is really open_door(char * ...);
  1584.  
  1585.        The library functions are classified as 3 different types.
  1586.        High level, intermediate and low level.   Normally a door would
  1587.        not need to make use of any of the functions except the high
  1588.        level functions.  These handle and watch all the system
  1589.        timeouts, carrier detects, keyboard timeouts etc.
  1590.        If you need more control, there are other functions available.
  1591.        I will warn you.  The lower level function you use, the less
  1592.        it will check for you automatically.  Do not use these unless
  1593.        you have to.
  1594.  
  1595.                                                                  Functions
  1596.        ck_open_door
  1597.        -------------------------------------------------------------------
  1598.        Summary:       #include "ckit.h"
  1599.                       short ck_open_door();
  1600.  
  1601.        Description:  The open door function initializes vectors, reads bbs
  1602.                      system information.    THIS MUST BE CALLED FIRST!
  1603.                      The first pointer should be be the path/name to the
  1604.                      system file. The second pointer should be the path/name
  1605.                      to the users file, if you designated USERSFILE=TRUE.
  1606.                      open_door() will also accept a pointer to a data
  1607.                      structure if ck_NOSYSTEM is TRUE.
  1608.                      (for pcboard systems only).  As long as you have defined
  1609.                      USERSFILE = FALSE, C-KIT will not attempt to use the
  1610.                      second pointer. Which ever you specify, the PORT:AAAA:X
  1611.                      (if used) must be the last parameter passed to
  1612.                      open_door();.
  1613.                      Close_door MUST be called before exiting program  after a
  1614.                      call to open_door. See the CKITDEMO.C for more examples.
  1615.  
  1616.        Return Value:  Will return NULL is successful, otherwise it will return
  1617.                       an error code listed below.
  1618.  
  1619.        See Also:      ck_close_door
  1620.  
  1621.        Example:  This example assumes the path\filenames passed on the command
  1622.                   line.  i.e  program_name path\filename path\filename port
  1623.  
  1624.        #include "ckit.h"
  1625.        short     result;
  1626.        main(int argc, char **argv) {
  1627.          if (argc > 0) {
  1628.            if(!ck_open_door(argv[1], argv[2], argv[3]));    <--- NOTE:
  1629.                   display_info();                                argv[2] and
  1630.                   your_main_program();                           argv[3] are
  1631.            } else {                                              optional.
  1632.                   printf("Error opening door!");                 see below.
  1633.            }
  1634.            ck_close_door();
  1635.            exit(0);
  1636.          }
  1637.        }
  1638.  
  1639.     open_door() returns these codes:
  1640.  
  1641.         0   ;Successful
  1642.         1   ;Unable to open BBS system file (pcboard.sys,door.sys etc)
  1643.         2   ;Problem reading BBS system file
  1644.         3   ;Unrecognized BBS file type
  1645.         4   ;Unable to open pcboard USERS file
  1646.         5   ;Invalid User record or problem seeking to user record
  1647.         6   ;Problem reading USER record
  1648.         7   ;PORT command syntax error
  1649.         8   ;Fossil driver specified but no Fossil driver installed
  1650.             ;or Digiboard driver not installed
  1651.         9   ;Memory allocation problem
  1652.  
  1653.  
  1654.                                                                  Functions
  1655.        ck_open_door  <cont.>
  1656.        -------------------------------------------------------------------
  1657.  
  1658. NOTE: Both PORT and USERSFILE are optional. If a user of your door needed to
  1659. specify a non-standard port address and IRQ, then the syntax is PORT:AAAA:X
  1660. where AAAA is the base address (hex) and X is the IRQ (0-15 decimal). It
  1661. doesn't matter whether PORT:AAAA:X is the second or third parameter
  1662. (depending on if you were opening the user file) passed to open_door() as
  1663. long as it is the LAST parameter passed.
  1664.  
  1665. Note also it does not matter which order on the cmd line the arguments are
  1666. listed. The only thing that matters is which order they are passed to the
  1667. open_door() function itself.  You could also have the system path as part of
  1668. a config file for your door.  Then you would read your config file and pass
  1669. the path read from it to open_door() as a string ptr.
  1670. PORT is optional, and C-KIT will default to standard addresses and irq's
  1671. if PORT is not used based on the port number read from the BBS file.
  1672. C-KIT will assume COM1 = 03F8 IRQ 4, COM2 = 02E8 IRQ3, COM3 = 03E8 IRQ4
  1673. and COM4 = 02E8 IRQ 3.  If the sysop had a different non-standard
  1674. port address and irq, he could then use the PORT cmd to change the
  1675. defaults.  For this reason, you should include the usage of PORT in
  1676. your door program and documenation.
  1677.  
  1678. Below is some examples of how your program would/could be called up
  1679. and how the open_door() function would be called.  Notice PORT is always
  1680. the second or third (last) argument to be passed if a user of your door
  1681. program wanted to use it.
  1682.  
  1683.   C-KIT will also support the use of FOSSIL drivers.  The syntax for a FOSSIL
  1684. driver is: PORT:F:P. The 'F' tells C-KIT to use a Fossil driver for it's
  1685. communications.  The 'P' following it tells it which port to use for the
  1686. Fossil. Example - PORT:F:1, tells C-KIT to use a fossil driver for port 1.
  1687.  
  1688. Digiboard Intelligent Async boards are  supported thru the Universal
  1689. DOS driver for Digiboard.  The syntax is the same as the Fossil driver
  1690. except you replace the F with D and give the channel number to use.
  1691. Example - PORT:D:6 tells C-KIT (your door) that it is connected to a
  1692. Digiboard and to use channel 6 on the Digiboard.
  1693.  
  1694. YOU AS A DOOR AUTHOR SHOULD ALSO INCLUDE THIS INFORMATION IN YOUR DOOR
  1695. DOCUMENTATION FILES AND INCLUDE IT IN YOUR CALL TO OPEN_DOOR().
  1696.  
  1697. open_door() works like this.  It will expect the first pointer to
  1698. be a string pointer to the BBS system file, always.  Next, it checks
  1699. to see if USERSFILE = TRUE.  If so, it will expect the second pointer
  1700. to be a string pointer to a PCBoard users file.  If USERSFILE is
  1701. FALSE it will not look for a users file.  Either case, open_door()
  1702. will search the stack frame pointers for the word "PORT" for the
  1703. 2nd and 3rd string pointers passed.  If it finds it, it will utilize
  1704. it.  If not, it will use the default port addresses/irq's defined
  1705. above for the COM port read from the system file.  For this reason,
  1706. open_door() will work whether there is actually a port command being
  1707. passed or not.  You as the door author should provide the users of your
  1708. door the ability to pass the port command if they are using NON-STANDARD
  1709. ports.
  1710.  
  1711.  
  1712.                                                                  Functions
  1713.        ck_open_door (cont.)
  1714.        -------------------------------------------------------------------
  1715.  
  1716. EXAMPLES: Assume door.cfg below is a config file that your door programs reads.
  1717. This all depends on how or what is desired for your door program.  You would
  1718. need to document in your door documentation what order the cmd line should
  1719. be for your door program, OR read your config file and pass the system name
  1720. and path to open_door().  You should also include info about the PORT:AAAA:X
  1721. in your docs and include that argument to open_door() as well.
  1722.  
  1723. Here is a short example of reading a config file and passing the system
  1724. name and path.
  1725.  
  1726. (Assuming the 1st line in the config file has the system path\name)
  1727.     main(int argc, char **argv) {
  1728.     short   handle, bytes_read;
  1729.     char    bbssyspath[81];
  1730.  
  1731.     handle = open(argv[1], O_RDONLY);             /* Open config file */
  1732.     bytes_read = read(handle, bbssyspath, 80);    /* Read system path\name */
  1733.     bbssyspath[bytes_read - 1] = '\0';            /* Null terminate */
  1734.     close(handle);                                /* Close config file */
  1735.     ck_open_door(bbssyspath, argv[2]);      /* include arg2 for the PORT cmd */
  1736.     ck_close_door();
  1737.  
  1738.     }
  1739.  
  1740. Your program's cmd line for the above could be any one of the following:
  1741.  
  1742. doorprgm  config.cfg                    ;Using standard ports
  1743. doorprgm  config.cfg PORT:03E8:12       ;Using non-standard port and irq 12
  1744. doorprgm  config.cfg PORT:F:1           ;Using a fossil driver on port 1
  1745. doorprgm  config.cfg PORT:D:5           ;Using Digiboard channel 5
  1746.  
  1747.  You may not need or want a config file for your door program so you could
  1748.  just simply have the sysop pass the system infomation on the command line.
  1749.  If this is the case, your program's cmd line could be any of the following:
  1750.  
  1751. doorprgm c:\wc\callinfo.bbs              ;Using standard ports
  1752. doorprgm c:\wc\callinfo.bbs PORT:03F8:5  ;Using non-standard port, irq 5
  1753. doorprgm c:\wc\callinfo.bbs PORT:F:1     ;Using a fossil driver on port 1
  1754. doorprgm  config.cfg PORT:D:7            ;Using Digiboard channel 7
  1755.  
  1756.   Again, you as the door author would explain in your documentation how the
  1757. sysop would set your door program up depending on how you decide to handle
  1758. reading the system files.  Just be sure and include information about the
  1759. PORT:AAAA:X, PORT:F:x, and the PORT:D:x commands as well.
  1760.  
  1761.  
  1762.                                                                  Functions
  1763.        ck_open_door (cont.)
  1764.        -------------------------------------------------------------------
  1765.  
  1766. HIGHLY RECOMMEDED!:
  1767.      You should include in your door source code C's atexit() function.
  1768. Then have it call a function that will test if door_open() has been called
  1769. or if close_door() has already been called.  Then if your program has a
  1770. runtime error, you will call close_door() so all interrupts vectors can be
  1771. restored and prevent a system crash.  Take a look at ckitdemo.c.
  1772. EXAMPLE:
  1773.  
  1774. short       OPENED;             /* Flag to know if open_door has been called  */
  1775. short       CLOSED;             /* Flag to know if close_door has beeb called */
  1776. void        shut_down(void);    /* Shuts door down if normal or error occurs. */
  1777.  
  1778. main(int argc, char **argv) {
  1779.  
  1780.         open_door(argv[1], argv[2]);
  1781.         OPENED = TRUE;              /* Door has been opened  */
  1782.         atexit(shut_down);
  1783.         .
  1784.         .
  1785.         .
  1786.  }
  1787.  
  1788. /****************************************************************************
  1789.  *      Close door, reset vectors etc.                                      *
  1790.  *  Need in case of a run time error occurs in door                         *
  1791.  *  and to check if a call to close_door needs to be made.                  *
  1792.  ****************************************************************************/
  1793.  void   shut_down(void) {
  1794.     if(OPENED && !CLOSED) {
  1795.         close_door();
  1796.         CLOSED = TRUE;
  1797.     }
  1798. }
  1799.  
  1800.  
  1801.                                                                  Functions
  1802.        ck_open_door (cont.)
  1803.        -------------------------------------------------------------------
  1804.  
  1805.   Another way open_door() can be used is thru the use of a data structure
  1806. defined as:
  1807.  
  1808. typedef struct ckitgeneric {
  1809.     char port[6];                   /* COM:?  */
  1810.     short min_left;                 /* minutes left */
  1811. };
  1812.  
  1813. This allows you to support BBS programs in your door program that are not
  1814. supported directly by Ckit.  To do this, you would read the BBS system
  1815. file yourself.  Obtain the necassary information for the data structure,
  1816. set ck_NOSYSTEM = TRUE, then call open_door().  Below is a short example
  1817. of reading a WWIV file.  (WWIV is not directly supported by CKIT).
  1818.  
  1819.  
  1820. typedef struct ckitgeneric {
  1821.     char port[6];            /* COM:x  (COM0: is local) */
  1822.     short min_left;          /* minutes left */
  1823. };
  1824.  
  1825. struct ckitgeneric  ck_gen;  /* You can name this whatever you want */
  1826.  
  1827. char *ptr;
  1828.  
  1829. if(WWIV) {
  1830.      open_file(bbs_system_file);
  1831.      read_file(bbs_system_file);
  1832.      setup_ck_gen();                    /* set up data structure */
  1833.      ck_NOSYSTEM = TRUE;
  1834.      ptr = &bbs_system_file);
  1835. } else {
  1836.      ptr = &bbs_system_file;
  1837.      ck_NOSYSTEM = FALSE;
  1838. }
  1839.  
  1840. open_door(ptr,  argv[2]); (2nd arg is for passing the PORT:AAAA:X cmd)
  1841. (AAAA = port address in hexidecimal,  X = IRQ number in decimal)
  1842. Take a look at the ckitdemo.c file for a complete example.
  1843.  
  1844.  
  1845.  
  1846.                                                            Functions
  1847.        ck_close_door                             high level
  1848.        -------------------------------------------------------------------
  1849.        Summary:       #include "ckit.h"
  1850.                       void ck_close_door(void);
  1851.  
  1852.        Description:   The close door function resets vectors, closes
  1853.                       files opened and prints the log off message.
  1854.                       THIS MUST BE CALLED LAST and ONLY after open_door().
  1855.                       Close_door MUST be called before exiting program
  1856.                       after a call has been made to open_door.
  1857.                       Not doing so will certainly cause a system lock up.
  1858.                       See above for using C's atexit() function.
  1859.                       Version 2.0 and above, close_door will check if
  1860.                       open_door has been called or if close_door() has
  1861.                       already been called to help further prevent any
  1862.                       system hangups.
  1863.  
  1864.        Return Value:  No value is returned.
  1865.  
  1866.        See Also:      ck_open_door.
  1867.  
  1868.        Example:
  1869.  
  1870.        #include "ckit.h"
  1871.        main(int argc, char **argv) {
  1872.          if (argc > 0) {
  1873.            ck_open_door("d:\wc\callinfo.bbs");
  1874.            .
  1875.            .
  1876.            .
  1877.            . your door program
  1878.            .
  1879.            .
  1880.            ck_close_door();
  1881.          };
  1882.        };
  1883.  
  1884.  
  1885.                                                                  Functions
  1886.  
  1887.        ck_update_user      PCBOARD 14.5 only        high level
  1888.        -------------------------------------------------------------------
  1889.        Summary:       #include "ckit.h"
  1890.                       void ck_update_user();
  1891.  
  1892.        Description:   The update user will accept a POINTER to the
  1893.                       user structure member to update.  See the
  1894.                       user structure above.  This function will only
  1895.                       work for PCBoard 14.5 and USERSFILE must be set
  1896.                       TRUE.  C-KIT will update the user file when the
  1897.                       door is closed.  If you do not want C-KIT to update
  1898.                       the user record after a change has been made
  1899.                       set USERSFILE = FALSE before calling close_door();
  1900.                       If you use this function you should set the compiler
  1901.                       to use WORD alignment for C-kit v.2.01 and below.
  1902.                       NOTE: IN VERSION 2.08 AND ABOVE, YOU NEED TO USE
  1903.                             BYTE ALIGNMENT!
  1904.  
  1905.        Return Value:  No value is returned.
  1906.  
  1907.        See Also:      ck_user structure
  1908.  
  1909.        Example: Change user security and comment1 field.
  1910.                 MOTICE THE & BELOW!.  You MUST pass the address of the
  1911.                 member to update in the user structure.
  1912.  
  1913.        #include "ckit.h"
  1914.        main(int argc, char **argv) {
  1915.        USERSFILE = TRUE;
  1916.        static char new_comment[] = "ckit_user";
  1917.        if (argc > 1) {
  1918.            ck_open_door(argv[1], argv[2]); (pass system file and PORT cmd)
  1919.            .
  1920.            .
  1921.            .
  1922.            ck_usersecurity = 50;
  1923.            ck_update_user(&ck_usersecurity);
  1924.            strcpy(ck_usercomment1, new_comment);
  1925.            ck_update_user(&ck_usercomment1);
  1926.            .
  1927.            .
  1928.            .
  1929.            ck_close_door();
  1930.          };
  1931.        };
  1932.  
  1933.                                                                  Functions
  1934.  
  1935.        ck_s_puts                                  high level
  1936.        -------------------------------------------------------------------
  1937.        Summary:       #include "ckit.h"
  1938.                       void ck_s_puts(char *);
  1939.  
  1940.        Description:   The s_puts function displays a single NULL termintated
  1941.                       (C string) to the local and remote console. It expects
  1942.                       a pointer to the string of type BYTE or char
  1943.                       to be displayed.  It will not handle ANSI.  See
  1944.                       ck_s_putstd() for ANSI and other usage.
  1945.  
  1946.        Return Value:  No value is returned.
  1947.  
  1948.        See Also:      s_printf, ck_s_putv, ck_s_putc, ck_s_putsn
  1949.  
  1950.        Example:
  1951.  
  1952.        #include "ckit.h"
  1953.        static BYTE string[] = "This is a test";
  1954.        main(int argc, char **argv) {
  1955.          if (argc > 1) {
  1956.            ck_open_door(argv[1]); /* pass system file(s) */
  1957.            .
  1958.            .
  1959.            .
  1960.            ck_s_puts(string);
  1961.            ck_s_puts("This is also a test");
  1962.            .
  1963.            .
  1964.            .
  1965.            ck_close_door();
  1966.          };
  1967.        };
  1968.  
  1969.  
  1970.                                                                 Functions
  1971.  
  1972.        ck_s_putstd                                  high level
  1973.        -------------------------------------------------------------------
  1974.        Summary:       #include "ckit.h"
  1975.                       void ck_s_putstd(char *);
  1976.  
  1977.        Description:   The s_putstd function displays a single NULL termintated
  1978.                       (C string) to the local and remote console. It expects
  1979.                       a pointer to the string of type BYTE or char
  1980.                       to be displayed. This function is identical to s_puts
  1981.                       except it uses std output.
  1982.                       This function should be used when ANSI code, or CTRL
  1983.                       chars are needed to be sent to the local and remote
  1984.                       consoles.
  1985.  
  1986.        Return Value:  No value is returned.
  1987.  
  1988.        See Also:      s_printf, ck_s_putv, ck_s_putc, ck_s_putsn
  1989.  
  1990.        Example:       Use s_putstd() to change background/foreground colors
  1991.                       #include "ckit.h"
  1992.  
  1993.        #define cyanblue        0
  1994.        #define yellowbrown     1
  1995.        #define redgreen        2
  1996.        #define redcyan         3
  1997.        #define cyanred         4
  1998.        #define cyanmagenta     5
  1999.        #define bluegrey        6
  2000.  
  2001.        static char *ansi_color[8]  = {
  2002.           "\33[0;1;36;44mCyan on Blue\33[40m"
  2003.           "\33[44m\33[33;43mYellow on Brown\33[40m"
  2004.           "\33[43m\33[0;31;42mRed on Green\33[40m"
  2005.           "\33[42m\33[46mRed on Cyan\33[40m"
  2006.           "\33[46m\33[1;36;41mCyan on Red\33[40m"
  2007.           "\33[41m\33[45mCyan on Magenta\33[40m"
  2008.           "\33[45m\33[0;34;47mBlue on Grey\33[0m"
  2009.        };
  2010.  
  2011.        main(int argc, char **argv) {
  2012.          if (argc > 0) {
  2013.            ck_open_door(argv[1]); /* pass system file(s) */
  2014.            .
  2015.            .
  2016.            .
  2017.            ck_s_putstd(ansi_color[cyanblue]);
  2018.            ck_s_putstd(ansi_color[yellowbrown]);
  2019.            ck_s_putstd(ansi_color[redgreen]);
  2020.            ck_s_putstd(ansi_color[redcyan]);
  2021.            ck_s_putstd(ansi_color[cyanred]);
  2022.            ck_s_putstd(ansi_color[cyanmagenta]);
  2023.            ck_s_putstd(ansi_color[bluegrey]);
  2024.            .
  2025.            .
  2026.            .
  2027.            ck_close_door();
  2028.          };
  2029.        };
  2030.  
  2031.  
  2032.                                                                  Functions
  2033.  
  2034.        ck_s_putv                                    high level
  2035.        -------------------------------------------------------------------
  2036.        Summary:       #include "ckit.h"
  2037.                       void ck_s_putv();
  2038.  
  2039.        Description:   The s_putv function displays a single NULL terminated
  2040.                       (C string) to the local and remote console. It expects
  2041.                       a variable argument of pointer(s) to the string(s)
  2042.                       of type BYTE or char to be displayed.  The list of
  2043.                       pointers MUST end with a NULL pointer!.  Not doing
  2044.                       so will most likely either cause garbage to printed
  2045.                       or even a hang-up.
  2046.  
  2047.        Return Value:  No value is returned.
  2048.  
  2049.        See Also:      s_printf, ck_s_puts, ck_s_putc, ck_s_putsn
  2050.  
  2051.        Example:       This example prints 2 strings with the pointer list
  2052.                       terminated with a NULL pointer.
  2053.  
  2054.        #include "ckit.h"
  2055.        static BYTE string[] = "This is a test";
  2056.        main(int argc, char **argv) {
  2057.          if (argc > 1) {
  2058.            ck_open_door(argv[1]); /* pass system file(s) */
  2059.            .
  2060.            .
  2061.            .
  2062.            static BYTE string[] = "This is a test";
  2063.            ck_s_putv(string, "This is also a test", NULL);
  2064.            .
  2065.            .
  2066.            .
  2067.            ck_close_door();
  2068.          };
  2069.        };
  2070.  
  2071. NOTE: an alternative to using s_putv would be to include the function
  2072.       s_printf() below in your source code.  You could use this function
  2073.       the same as you would printf();  This function has already been protyped
  2074.       in CKIT.H
  2075.  
  2076.  
  2077.                                                                  Functions
  2078.        s_printf                               high level
  2079.        -------------------------------------------------------------------
  2080.        Summary:       #include "ckit.h"
  2081.                       void    s_printf(char *,...);
  2082.  
  2083.        Description:   The s_printf function is used to format an output
  2084.                       to be sent to the local and remote console. It is
  2085.                       exactly the same as the cprintf() function in C.
  2086.                       To use it, you must include the source code listed
  2087.                       below in your door program since s_printf() is NOT an
  2088.                       actual part of the C-KIT librarys.
  2089.                       NOTE: if you want to send ANSI strings, change the
  2090.                       s_puts in the s_printf function to s_putstd or create
  2091.                       another std_printf function using s_putstd as the
  2092.                       output.
  2093.  
  2094.        Return Value:  No value is returned.
  2095.  
  2096.        See Also:      s_printf, s_puts, s_putv
  2097.  
  2098. INCLUDE THIS SOURCE CODE IN YOUR DOOR PROGRAM TO USE S_PRINTF!
  2099. THE FUNCTION HAS ALREADY BEEN PROTOTYPED IN CKIT.H
  2100. MODIFY AS YOU NEED.
  2101. /****************************************************************************
  2102.  *      Printf() function for sending output to port                        *
  2103.  ****************************************************************************/
  2104. void s_printf(char *s_format,...) {
  2105.     va_list arg_pointer;
  2106.     char buffer[82];                    /*  string buffer for 81 chars */
  2107.     va_start(arg_pointer, s_format);
  2108.     vsprintf(buffer, s_format, arg_pointer);
  2109.     s_putstd(buffer);                  /* change to s_putstd() for ANSI */
  2110.     va_end(arg_pointer);
  2111. }
  2112.  
  2113.        Example:
  2114. /****************************************************************************
  2115.  *      sending a string out the port using s_printf()                      *
  2116.  ****************************************************************************/
  2117.        #include "ckit.h"
  2118.        short  number  34;
  2119.        main(int argc, char **argv) {
  2120.          if (argc > 1) {
  2121.            ck_open_door("c:\rbbs\dorinfo1.def", argv[1]);
  2122.            .
  2123.            .
  2124.            .
  2125.            s_printf("Hello, %s. The number is %d.", firstname, number);
  2126.            .
  2127.            .
  2128.            .
  2129.            ck_close_door();
  2130.          };
  2131.        };
  2132.  
  2133.  
  2134.                                                                  Functions
  2135.  
  2136.        ck_s_putsn                                   high level
  2137.        -------------------------------------------------------------------
  2138.        Summary:       #include "ckit.h"
  2139.                       void ck_s_putsn(char *);
  2140.  
  2141.        Description:   The s_putsn function displays a single NULL terminated
  2142.                       (C string) to the local console only.       It expects
  2143.                       a pointer to the string of type BYTE or char
  2144.                       to be displayed.
  2145.  
  2146.        Return Value:  No value is returned.
  2147.  
  2148.        See Also:      s_printf, ck_s_putv, ck_s_putc, ck_s_putstd
  2149.  
  2150.        Example:
  2151.  
  2152.        #include "ckit.h"
  2153.        static BYTE string[] = "This is a test";
  2154.        main(int argc, char **argv) {
  2155.          if (argc > 1) {
  2156.            ck_open_door(argv[1], argv[2]); (include arg2 for the PORT cmd)
  2157.            .
  2158.            .
  2159.            .
  2160.            static BYTE string[] = "This is a test";
  2161.            ck_s_putsn(string);
  2162.            ck_s_putsn("This is also a test");
  2163.            .
  2164.            .
  2165.            .
  2166.            ck_close_door();
  2167.          };
  2168.        };
  2169.  
  2170.  
  2171.                                                                  Functions
  2172.  
  2173.        ck_s_putc                                high level
  2174.        -------------------------------------------------------------------
  2175.        Summary:       #include "ckit.h"
  2176.                       void ck_s_putc(BYTE);
  2177.  
  2178.        Description:   The s_putc function displays a single BYTE or char
  2179.                       to the local and remote console.
  2180.  
  2181.        Return Value:  No value is returned.
  2182.  
  2183.        See Also:      s_printf, ck_s_puts, ck_s_putc.
  2184.  
  2185.        Example:       This example prints a single BYTE (ASCII A) to local
  2186.                       and remote console.
  2187.  
  2188.        #include "ckit.h"
  2189.        BYTE byte_to_send = 0x41;
  2190.        short   handle, bytes_read;
  2191.        char    pcbsyspath[81];
  2192.        main(int argc, char **argv) {
  2193.        if (argc > 1) {
  2194.             handle = open(argv[1], O_RDONLY);
  2195.             bytes_read = read(handle, pcbsyspath, 80);
  2196.             pcbsyspath[bytes_read - 1] = '\0';
  2197.             close(handle);
  2198.             open_door(pcbsyspath, argv[2]); (include arg2 for the PORT cmd)
  2199.             ck_s_putc(byte_to_send);
  2200.             ck_close_door();
  2201.           };
  2202.        };
  2203.  
  2204.                                                                 Functions
  2205.  
  2206.        ck_newline                               high level
  2207.        -------------------------------------------------------------------
  2208.        Summary:       #include "ckit.h"
  2209.                       void ck_newline(void);
  2210.  
  2211.        Description:   The newline function sends a Carriage Return/
  2212.                       Line Feed to the local and remote console.
  2213.                       Increments ck_linenum.
  2214.  
  2215.        Return Value:  No value is returned.
  2216.  
  2217.        See Also:      s_printf, ck_s_puts, ck_s_putc, ck_linenum
  2218.  
  2219.        Example:       This example prints single CR/LF to local
  2220.                       and remote console.
  2221.  
  2222.        #include "ckit.h"
  2223.        main(int argc, char **argv) {
  2224.          if (argc > 1) {
  2225.            ck_open_door(argv[1]), argv[2]);
  2226.            .
  2227.            .
  2228.            .
  2229.            ck_newline();
  2230.            .
  2231.            .
  2232.            .
  2233.            ck_close_door();
  2234.          };
  2235.        };
  2236.  
  2237.  
  2238.                                                                  Functions
  2239.  
  2240.        ck_clear_row                             high level
  2241.        -------------------------------------------------------------------
  2242.        Summary:       #include "ckit.h"
  2243.                       void ck_clear_row(short);
  2244.  
  2245.        Description:   The clear_row function clears a given row on screen
  2246.                       of the local and remote console. (row = 1 - 24).
  2247.                       Used only if caller is in GRAPHICS or ansi_ng mode.
  2248.  
  2249.        Return Value:  No value is returned.
  2250.  
  2251.        See Also:      ck_clear_eol, ck_clr_screen.
  2252.  
  2253.        Example:       This example prints a string on a line, then
  2254.                       erases the string.
  2255.  
  2256.        #include ckit.h
  2257.        char prompt1 = "Enter filename to view: ";
  2258.        main(int argc, char **argv) {
  2259.          if (argc > 1) {
  2260.            ck_open_door(argv[1], argv[2]); (pass system file and port cmd)
  2261.            ck_pos_cursor(10, 1);
  2262.            ck_s_puts(prompt1);
  2263.            ck_pos_cursor(11, 1);
  2264.            ck_s_puts("Ready to clear above row, press a key");
  2265.            while(!(wait_keypress())) {
  2266.          };
  2267.          ck_clear_row(10);  /* clear row 10 */
  2268.          ck_newline();
  2269.          ck_close_door();
  2270.        };
  2271.  
  2272.  
  2273.                                                                  Functions
  2274.  
  2275.        ck_clear_eol                             high level
  2276.        -------------------------------------------------------------------
  2277.        Summary:       #include "ckit.h"
  2278.                       void ck_clear_eol(void);
  2279.  
  2280.        Description:   The clear_eol function clears to the end of line
  2281.                       from current cursor position.
  2282.                       Used only if caller is in GRAPHICS or ansi_ng mode.
  2283.  
  2284.        Return Value:  No value is returned.
  2285.  
  2286.        See Also:      ck_clear_eol, ck_clr_screen.
  2287.  
  2288.        Example:       This example clears to end of line on screen of
  2289.                       local and remote console.
  2290.  
  2291.        #include ckit.h
  2292.        char prompt1 = "Enter filename to view: ";
  2293.        main(int argc, char **argv) {
  2294.          if (argc > 1) {
  2295.            ck_open_door("c:\wildcat\callinfo.bbs", "PORT:03E8:5");
  2296.            ck_newline();
  2297.            ck_s_puts("Press a key to clear end of line below");
  2298.            ck_newline();
  2299.            ck_s_putv(prompt1, "\r", NULL);
  2300.            while(!(wait_keypress())) {
  2301.            };
  2302.            ck_clear_eol();
  2303.            ck_newline();
  2304.            ck_close_door();
  2305.          };
  2306.        };
  2307.  
  2308.  
  2309.                                                                  Functions
  2310.  
  2311.        ck_clr_screen                             high level
  2312.        -------------------------------------------------------------------
  2313.        Summary:       #include "ckit.h"
  2314.                       void ck_clr_screen(void);
  2315.  
  2316.        Description:   The clr_screen function clears entire screen of local
  2317.                        and remote console in either ASCII, GRAPHIC, or
  2318.                        ansi_ng mode.
  2319.  
  2320.        Return Value:  No value is returned.
  2321.  
  2322.        See Also:      ck_clear_screen.
  2323.  
  2324.        Example:       This example clears screen of local/remote console.
  2325.  
  2326.        #include ckit.h
  2327.        main(int argc, char **argv) {
  2328.          if (argc > 1) {
  2329.            ck_open_door(argv[1]);
  2330.            .
  2331.            .
  2332.            .
  2333.            ck_clr_screen();
  2334.            .
  2335.            .
  2336.            .
  2337.            ck_close_door();
  2338.          };
  2339.        };
  2340.  
  2341.                                                                  Functions
  2342.  
  2343.        ck_clear_screen                           high level
  2344.        -------------------------------------------------------------------
  2345.        Summary:       #include "ckit.h"
  2346.                       void ck_clear_screen(void);
  2347.  
  2348.        Description:   The clear_screen function clears entire screen of
  2349.                       local console including status line.
  2350.  
  2351.        Return Value:  No value is returned.
  2352.  
  2353.        See Also:      ck_clr_screen.
  2354.  
  2355.        Example:       This example clears screen of local console.
  2356.  
  2357.        #include ckit.h
  2358.        main(int argc, char **argv) {
  2359.          if (argc > 1) {
  2360.            ck_open_door(argv[1]);
  2361.            .
  2362.            .
  2363.            .
  2364.            ck_clear_screen();
  2365.            .
  2366.            .
  2367.            .
  2368.            ck_close_door();
  2369.          };
  2370.        };
  2371.  
  2372.  
  2373.                                                                  Functions
  2374.  
  2375.        ck_pos_cursor                             high level
  2376.        -------------------------------------------------------------------
  2377.        Summary:       #include "ckit.h"
  2378.                       void ck_pos_cursor(short, short);
  2379.  
  2380.        Description:   The pos_cursor function positions cursor at
  2381.                       row, column using ANSI. Caller must be in GRAPHICS,
  2382.                       or ansi_ng mode. If not no action will take place.
  2383.                       row = 1 to 25, column = 1 to 80.  C-KIT will not
  2384.                       let the local screen position cursor in status
  2385.                       line area.
  2386.  
  2387.        Return Value:  No value is returned.
  2388.  
  2389.        Example:       This example positions cursor at row 10, column 15
  2390.                       on the local/remote consoles.
  2391.  
  2392.        #include "ckit.h"
  2393.        short     row = 10;
  2394.        short     column = 15;
  2395.        main(int argc, char **argv) {
  2396.          if (argc > 1) {
  2397.            ck_open_door(argv[1]);
  2398.            .
  2399.            .
  2400.            .
  2401.            ck_pos_cursor(row, column);
  2402.            .
  2403.            .
  2404.            .
  2405.            ck_close_door();
  2406.          };
  2407.        };
  2408.  
  2409.                                                                  Functions
  2410.  
  2411.        ck_set_r_c                                high level
  2412.        -------------------------------------------------------------------
  2413.        Summary:       #include "ckit.h"
  2414.                       void ck_set_r_c(short, short);
  2415.  
  2416.        Description:   The set_r_c function positions cursor at
  2417.                       row, column using BIOS on the local screen.
  2418.                       row = 1 to 25 (23), column = 1 to 80.
  2419.                       C-KIT will not let the cursor be placed in the
  2420.                       status line area of local screen.
  2421.  
  2422.        Return Value:  No value is returned.
  2423.  
  2424.        Example:       This example positions cursor at row 5, column 1
  2425.                       on the local console.
  2426.  
  2427.        #include "ckit.h"
  2428.  
  2429.        short     row = 5;
  2430.        short     column = 1;
  2431.  
  2432.        main(int argc, char **argv) {
  2433.          if (argc > 1) {
  2434.            ck_open_door(argv[1]);
  2435.            .
  2436.            .
  2437.            .
  2438.            ck_set_r_c(row, column);
  2439.            .
  2440.            .
  2441.            .
  2442.            ck_close_door();
  2443.          };
  2444.        };
  2445.  
  2446.                                                                  Functions
  2447.  
  2448.        ck_back_space                             high level
  2449.        -------------------------------------------------------------------
  2450.        Summary:       #include "ckit.h"
  2451.                       void ck_back_space(short);
  2452.  
  2453.        Description:   The back_space function backspaces cursor short number
  2454.                       of spaces or to the 1st char in row, whichever is 1st.
  2455.                       This is a destrutive backspace.
  2456.  
  2457.        Return Value:  No value is returned.
  2458.  
  2459.        Example:       This example backspaces cursor over the prompt and
  2460.                       on the user's input local/remote consoles.
  2461.  
  2462.        #include ckit.h
  2463.  
  2464.        char prompt1 = "Enter filename to view: ";
  2465.  
  2466.        main(int argc, char **argv) {
  2467.          if (argc > 1) {
  2468.            ck_open_door("c:\pcb\pcboard.sys", "PORT:02E8:4");
  2469.            ck_s_puts("\r\nReady to test back_space()");
  2470.            ck_s_puts("Press a key when ready");
  2471.            ck_newline();
  2472.            while(!(wait_keypress())) {
  2473.          };
  2474.          ck_color(yellow);
  2475.          ck_s_puts(prompt1);
  2476.          ck_color(red);
  2477.          ck_get_cmdline();
  2478.          ck_back_space(strlen(prompt1) + strlen(cmdline));
  2479.          ck_close_door();
  2480.        };
  2481.  
  2482.  
  2483.                                                                  Functions
  2484.  
  2485.        ck_color                                  high level
  2486.        -------------------------------------------------------------------
  2487.        Summary:       #include "ckit.h"
  2488.                       void ck_color(short);
  2489.  
  2490.        Description:   The color function selects color to use using ANSI.
  2491.                       Caller must be in GRAPHICS mode.  If not, no action
  2492.                       is taken.  ck_color will only set the forground color
  2493.                       and leave the background color as it was.
  2494.  
  2495.        Return Value:  No value is returned.
  2496.  
  2497.        See Also:      Color macros above in macro section used with C-KIT
  2498.  
  2499.        Example:       This example sets color to red  on the local/remote
  2500.                       consoles.(see color macros in ckit.h)
  2501.  
  2502.            #include "ckit.h"
  2503.            main(int argc, char **argv) {
  2504.              if (argc > 1) {
  2505.                ck_open_door(argv[1]);
  2506.                .
  2507.                .
  2508.                .
  2509.                ck_color(red);
  2510.                .
  2511.                .
  2512.                .
  2513.                ck_close_door();
  2514.              };
  2515.            };
  2516.  
  2517.                                                                 Functions
  2518.  
  2519.        ck_set_ANSI                               high level
  2520.        -------------------------------------------------------------------
  2521.        Summary:       #include "ckit.h"
  2522.                       short  ck_set_ANSI(short)
  2523.  
  2524.        Description:   Allows manual program changing of ANSI capability.
  2525.                       Excepts either TRUE/FALSE.   Normally when C-kit
  2526.                       first opens a system file it determines from the file
  2527.                       whether the user wants ANSI control, (ansi_NG will
  2528.                       be set, GRAPHICS FALSE) OR if they wanted ANSI control
  2529.                       with graphics (ansi_NG false, GRAPHICS TRUE).  This
  2530.                       information is not available for generic.sys.
  2531.                       ck_set_ANSI allows people using the generic.sys file
  2532.                       to select ANSI control and/or ANSI control with
  2533.                       graphics.
  2534.  
  2535.        Return Value:  Returns whatever is passed to it.
  2536.  
  2537.        See Also:      ck_graphics, ck_ansi_ng
  2538.  
  2539.        Example:       This example turns on ANSI capability without
  2540.                       graphics.
  2541.  
  2542.            #include "ckit.h"
  2543.            main(int argc, char **argv) {
  2544.              if (argc > 1) {
  2545.                ck_open_door(argv[1]);
  2546.                .
  2547.                .
  2548.                .
  2549.                ansi_ng |= TRUE;  /* Set ansi_ng */
  2550.                graphics &= FALSE;
  2551.                .
  2552.                .
  2553.                .
  2554.                ck_set_ANSI(ansi_ng | graphics);
  2555.                .
  2556.                .
  2557.                .
  2558.                ck_close_door();
  2559.              };
  2560.            };
  2561.  
  2562.                                                                  Functions
  2563.  
  2564.        ck_get_cmdline                            high level
  2565.        -------------------------------------------------------------------
  2566.        Summary:       #include "ckit.h"
  2567.                       void ck_get_cmdline(void);
  2568.  
  2569.        Description:   Read a line of input (max 128 bytes). Echo to
  2570.                       screen, leave cursor after the last key typed before
  2571.                       C/R. Automatically checks for time_left, carrier.
  2572.                       Calls ck_input() and reads into array *cmdline,
  2573.                       automatically maps input to Uppercase.
  2574.                       Will also set key_source to source of input.
  2575.                       *defined in CKIT.H.  This function is the one
  2576.                       you would normally use for ALL user input.
  2577.                       ALL other input functions are intermediate or low
  2578.                       level functions.  Setting ck_DOTS = char will cause
  2579.                       char to be echoed to the remote/local console.
  2580.                       Filters all ASCII control charactors below 31 dec. out.
  2581.  
  2582.        Return Value:  No value is returned.
  2583.  
  2584.        See Also:      ck_input, ck_get_nextpar, ck_key_source, ck_wait_keypress
  2585.  
  2586.        Example:       This example reads keyboard  from local/remote
  2587.                       console into array get_cmdline[].  It also checks
  2588.                       for any scan_codes receieved.  See Ckitdemo.c also.
  2589.  
  2590.             #include "ckit.h"
  2591.             main(int argc, char **argv) {
  2592.             ck_open_door(argv[1]);
  2593.             do {
  2594.                 ck_newline();
  2595.                 display_time();
  2596.                 ck_color(green);
  2597.                 ck_s_puts("Command? ");
  2598.                 ck_get_cmdline();          /* read input into 'cmdline'  */
  2599.  
  2600.             } while((ck_DUMP_USER != TRUE) && (strlen(ck_cmdline) == 0) \
  2601.                    && (ck_scan_code == 0));
  2602.         }
  2603.         if (ck_DUMP_USER == TRUE) {
  2604.             ck_close_door();
  2605.             exit(1);
  2606.         }
  2607.         if (ck_scan_code != NULL) {
  2608.             ck_color(white);
  2609.             read_scancode();
  2610.             ck_newline();
  2611.         }
  2612.         if (ck_get_nextpar()) { /* scan next parameter from cmdline into par */
  2613.             ck_newline();
  2614.       /* process commands */
  2615.             switch ( par[0] ) {
  2616.                 case 'A':
  2617.                 ansi_demo();
  2618.                 break;
  2619.                 default:
  2620.                 ck_color(magenta);
  2621.                 ck_s_putv("(",par,") is not allowed!  Try again:", NULL);
  2622.                 *ck_cmdline = NULL;
  2623.             }
  2624.         }
  2625.  
  2626.  
  2627.                                                                  Functions
  2628.  
  2629.        ck_wait_keypress                          high level
  2630.        -------------------------------------------------------------------
  2631.        Summary:       #include "ckit.h"
  2632.                       short ck_wait_keypress(void);
  2633.  
  2634.        Description:   Waits for any keypress. Does not wait for a C/R.
  2635.                       Autochecks for CARRIER,  TIMEOUTS etc.
  2636.  
  2637.                       Returns ASCII code of key pressed or TRUE if
  2638.                       ck_DUMP_USER goes TRUE otherwise it will return FALSE.
  2639.                       Will also return TRUE if extended key is pressed.
  2640.                       Will not do so if a sysop function key is pressed.
  2641.                       Useful for "hot_key" applications. Will also set
  2642.                       key_source to proper value.
  2643.  
  2644.        Return Value:  ASCII code of keypressed or TRUE, FALSE
  2645.  
  2646.        See also: ck_check_CR, ck_check_keypress, ck_input, ck_get_cmdline
  2647.  
  2648.        Example:      This example will wait until a keypress or ck_DUMP_USER.
  2649.  
  2650.        #include "ckit.h"
  2651.  
  2652.        prompt2 = ""Press any key to continue";
  2653.  
  2654.        main(int argc, char **argv) {
  2655.          if (argc > 1) {
  2656.            ck_open_door(argv[1]);
  2657.            .
  2658.            .
  2659.            .
  2660.            ck_color(yellow);
  2661.            ck_newline();
  2662.            ck_s_puts(prompt2);
  2663.            while(!(ck_wait_keypress())) {
  2664.            };
  2665.            ck_back_space(strlen(prompt2) + 1);
  2666.            .
  2667.            .
  2668.            .
  2669.            ck_close_door();
  2670.          };
  2671.        };
  2672.  
  2673.  
  2674.                                                                  Functions
  2675.  
  2676.        ck_force_enter                            high level
  2677.        -------------------------------------------------------------------
  2678.        Summary:       #include "ckit.h"
  2679.                       void ck_force_enter(void);
  2680.  
  2681.        Description:   Prompts " Press Enter to continue: ", wait for C/R,
  2682.                       automatic carrier, time_left and sysop checks.
  2683.  
  2684.        Return Value:  NONE
  2685.  
  2686.        Example:       This example displays a string then prompts and
  2687.                       forces user to press C/R to continue.
  2688.  
  2689.        #include "ckit.h"
  2690.        main(int argc, char **argv) {
  2691.          if (argc > 1) {
  2692.            ck_open_door(argv[1]);
  2693.            .
  2694.            .
  2695.            .
  2696.            ck_color(yellow);
  2697.            ck_s_puts("Display this string\r\n");
  2698.            ck_force_enter();
  2699.            .
  2700.            .
  2701.            .
  2702.            ck_close_door();
  2703.          };
  2704.        };
  2705.  
  2706.  
  2707.                                                                  Functions
  2708.  
  2709.        display_time                              high level
  2710.        -------------------------------------------------------------------
  2711.        Summary:       #include "ckit.h"
  2712.                       void display_time(void);
  2713.  
  2714.        Description:   Displays (xxxx used, xxx left).
  2715.                       In CKIT2.0 and above, this function is not in
  2716.                       the library.  Instead, using the source code
  2717.                       below will do the same thing as previous
  2718.                       display_time().
  2719.  
  2720.        Return Value:  NONE
  2721.  
  2722.        See Also: mins_left_system(), system_time_used()
  2723.  
  2724.        Example:   See CKITDEMO.C also
  2725.  
  2726.        #include "ckit.h"
  2727.        main(int argc, char **argv) {
  2728.          ck_open_door(argv[1]);
  2729.          if (argc > 1) {
  2730.             ck_open_door(system_ptr, port_cmd_ptr);
  2731.             .
  2732.             .
  2733.             .
  2734.             display_time();
  2735.             .
  2736.             .
  2737.             .
  2738.        };
  2739.  
  2740.        void display_time(void) {
  2741.             color(yellow);
  2742.             ck_s_puts("(");
  2743.             ck_color(green);
  2744.             s_printf("%d used, ", system_time_used()+prev_used);
  2745.             ck_color(red);
  2746.             s_printf("%d left",  mins_left_system()+time_credit);
  2747.             ck_color(yellow);
  2748.             ck_s_puts(") ");
  2749.        }
  2750.  
  2751.  
  2752.                                                                  Functions
  2753.  
  2754.        ck_get_cmdline_raw                        high level
  2755.        -------------------------------------------------------------------
  2756.        Summary:       #include "ckit.h"
  2757.                       void ck_get_cmdlinaw(short);
  2758.  
  2759.        Description:   Same as get_cmdline() above but erases prompt of
  2760.                       after input and user input also.  Expects length
  2761.                       of prompt to be passed to it.
  2762.  
  2763.        Return Value:  No value is returned.
  2764.  
  2765.        See Also:      ck_get_cmdline, ck_get_nextpar, ck_get_cmdline, ck_input
  2766.  
  2767.        Example:       This example reads keyboard  from local/remote
  2768.                       console into array cmdline[], (filename), then
  2769.                       displays file.
  2770.  
  2771.        #include "ckit.h"
  2772.  
  2773.        char prompt1 = "Enter filename to display: ";
  2774.  
  2775.        main(int argc, char **argv) {
  2776.          if (argc > 1) {
  2777.            ck_open_door(argv[1]);
  2778.            ck_s_puts(prompt1);
  2779.            ck_get_cmdline_raw(strlen(prompt1));
  2780.            ck_newline();
  2781.            ck_display_file(cmdline);
  2782.            ck_close_door();
  2783.          };
  2784.        };
  2785.  
  2786.  
  2787.                                                                  Functions
  2788.  
  2789.        ck_get_nextpar                            high level
  2790.        -------------------------------------------------------------------
  2791.        Summary:       #include "ckit.h"
  2792.                       char ck_get_nextpar(void);
  2793.  
  2794.        Description:   Scans next stacked command from cmdline[] array
  2795.                       into "par[]".  par defined in CKIT.H
  2796.  
  2797.        Return Value:  Returns 0 if none available, non-zero if cmd available
  2798.  
  2799.        See Also:      input, get_cmdline, cmdline and par in GLOBAL section.
  2800.  
  2801.        Example:       This example reads keyboard  from local/remote
  2802.                       console into array get_cmdline[], then calls
  2803.                       get_nextpar to scan for cmds entered.
  2804.  
  2805.      #include "ckit.h"
  2806.  
  2807.      main(int argc, char **argv) {
  2808.        if (argc > 1) {
  2809.          ck_open_door(argv[1]);
  2810.          do {
  2811.             ck_get_cmdline();    /* read input into 'cmdline'  */
  2812.          } while( (ck_DUMP_USER != TRUE) && ( strlen(cmdline) == 0 ));
  2813.          if (ck_get_nextpar()) { /* scan next parameter from cmdline into par */
  2814.          /* process commands */
  2815.             switch ( ck_par[0] ) {
  2816.                 case 'A':
  2817.                 ansi_demo();
  2818.                 break;
  2819.                 default:
  2820.                 break;
  2821.             };
  2822.          };
  2823.        };
  2824.       ck_close_door();
  2825.      };
  2826.  
  2827.                                                                  Functions
  2828.  
  2829.        ck_nomore                                 high level
  2830.        -------------------------------------------------------------------
  2831.        Summary:       #include "ckit.h"
  2832.                       short ck_nomore(void);
  2833.  
  2834.        Description:   Displays prompt:
  2835.                       "More: (Enter) or (Y)es, (N)o, (NS)nonstop? ".
  2836.                        Returns 0 = Non_stop
  2837.                                1 = Yes
  2838.                                2 = No
  2839.  
  2840.                       Also checks for CTRL K.
  2841.                       The "More:" prompt will be yellow,
  2842.                       the rest will be green.
  2843.  
  2844.        Return Value: short value, meaning described above/
  2845.  
  2846.        See Also:      ck_get_def, ck_get_defyn, ck_get_defen
  2847.  
  2848.        Example:       This example loops 3 times to show what each
  2849.                       keypress (N,Y or NS) returns.
  2850.        #include "ckit.h"
  2851.  
  2852.        short      result, i;
  2853.  
  2854.        main(int argc, char **argv) {
  2855.          if (argc > 1) {
  2856.            ck_open_door(argv[1]);
  2857.            for(i=0; i <= 2; i++) {
  2858.              ck_s_puts("\r\nReady to test NOMORE 3 times");
  2859.              ck_newline();
  2860.              while(!(ck_wait_keypress())) {
  2861.              };
  2862.              result = ck_nomore();
  2863.              printf("Nomore() returned  %d", result);
  2864.              ck_newline();
  2865.           };
  2866.        ck_close_door();
  2867.        };
  2868.  
  2869.                                                                  Functions
  2870.  
  2871.        ck_get_defyn                              high level
  2872.        -------------------------------------------------------------------
  2873.        Summary:       #include "ckit.h"
  2874.                       void ck_get_defyn(char *, short)
  2875.  
  2876.        Description:   Displays prompt string and either
  2877.                       "Enter=yes " or "Enter=no" based on short value.
  2878.                       1st prompt will be yellow, default will be green.
  2879.                       If short is Non_zero it will display "Enter=Yes".
  2880.                       If short is Zero (NULL) it will display "Enter=No".
  2881.                       Calls get_cmdline for user input.
  2882.  
  2883.        Return Value:  None
  2884.  
  2885.        See Also:      ck_cmd_line, ck_get_def, ck_get_defyn, ck_get_defen
  2886.  
  2887.        Example:       This example loops 2 times to show what each
  2888.                       value or i displays.
  2889.        #include "ckit.h"
  2890.  
  2891.        short i;
  2892.  
  2893.        main(int argc, char **argv) {
  2894.          if (argc > 1) {
  2895.            ck_open_door(argv[1]);
  2896.            for(i=0; i <= 1; i++) {
  2897.              ck_s_puts("\r\nReady to test get_defyn()");
  2898.              ck_newline();
  2899.              ck_get_defyn("Continue? ", i);
  2900.              ck_s_putv("You entered ", cmdline, NULL);
  2901.              ck_newline();
  2902.           };
  2903.        ck_close_door();
  2904.        };
  2905.  
  2906.                                                                  Functions
  2907.  
  2908.        ck_get_defen                              high level
  2909.        -------------------------------------------------------------------
  2910.        Summary:       #include "ckit.h"
  2911.                       void ck_get_defen(char *)
  2912.  
  2913.        Description:   Same as get_defyn except the default string
  2914.                       "(Enter=none?) " will be appended.
  2915.                       1st prompt will be yellow, default will be green.
  2916.                       Calls get_cmdline for user input.
  2917.  
  2918.        Return Value:  None
  2919.  
  2920.        See Also:      ck_cmd_line, ck_get_def, ck_get_defyn, ck_get_defen
  2921.  
  2922.        Example:
  2923.  
  2924.        #include "ckit.h"
  2925.  
  2926.        main(int argc, char **argv) {
  2927.          if (argc > 1) {
  2928.            ck_open_door(argv[1]);
  2929.            ck_s_puts("\r\nReady to test get_defne()");
  2930.            ck_newline();
  2931.            ck_get_defne("Enter filename? ");
  2932.            ck_s_putv("You entered ", cmdline, NULL);
  2933.            ck_newline();
  2934.        ck_close_door();
  2935.        };
  2936.  
  2937.                                                                  Functions
  2938.  
  2939.        ck_getdef                                 high level
  2940.        -------------------------------------------------------------------
  2941.        Summary:       #include "ckit.h"
  2942.                       void   ck_get_def(char *, char *)
  2943.  
  2944.        Description:   Same as get_defen except both colored prompts
  2945.                       are user defineable.  The 1st prompt will be
  2946.                       yellow, the 2nd one green.
  2947.                       Calls get_cmdline for user input.
  2948.        Return Value:  None
  2949.  
  2950.        See Also:      ck_cmd_line, ck_get_def, ck_get_defyn, ck_get_defen
  2951.  
  2952.        Example:       Print 2 prompts, and print user input.
  2953.  
  2954.        static  char prompt1 = "Enter filename? "
  2955.        static  char prompt2 = "(Enter = quit)";
  2956.  
  2957.        #include "ckit.h"
  2958.  
  2959.        main(int argc, char **argv) {
  2960.          if (argc > 1) {
  2961.            ck_open_door(argv[1]);
  2962.            ck_s_puts("\r\nReady to test get_def()");
  2963.            ck_newline();
  2964.            ck_get_def(prompt1, prompt2);
  2965.            ck_s_putv("You entered ", cmdline, NULL);
  2966.            ck_newline();
  2967.        ck_close_door();
  2968.        };
  2969.  
  2970.                                                                  Functions
  2971.  
  2972.        ck_prompt_def                             high level
  2973.        -------------------------------------------------------------------
  2974.        Summary:       #include "ckit.h"
  2975.                       void ck_prompt_def(char *, char *)
  2976.  
  2977.        Description:   Same as get_def except it does not call
  2978.                       get_cmdline. 1st prompt will be yellow,
  2979.                       2nd prompt green.
  2980.  
  2981.        Return Value:  None
  2982.  
  2983.        See Also:      ck_cmd_line, ck_get_def, ck_get_defyn, ck_get_defen
  2984.  
  2985.        Example:       Print 2 prompts.
  2986.  
  2987.        static  char prompt1 = "Enter filename? "
  2988.        static  char prompt2 = "(Enter = quit)";
  2989.  
  2990.        #include "ckit.h"
  2991.  
  2992.        main(int argc, char **argv) {
  2993.          if (argc > 1) {
  2994.            ck_open_door(argv[1]);
  2995.            ck_s_puts("\r\nReady to test prompt_def()");
  2996.            ck_newline();
  2997.            ck_prompt_def(prompt1, prompt2);
  2998.            ck_get_cmdline();
  2999.            ck_newline();
  3000.        ck_close_door();
  3001.        };
  3002.  
  3003.                                                                  Functions
  3004.  
  3005.        ck_getdefn                                high level
  3006.        -------------------------------------------------------------------
  3007.        Summary:       #include "ckit.h"
  3008.                       void   ck_get_defn(char *, char *)
  3009.  
  3010.        Description:   Same as get_def except appends "Enter=none" to end.
  3011.                       Calls get_cmdline for user input.
  3012.  
  3013.        Return Value:  None
  3014.  
  3015.        See Also:      ck_cmd_line, ck_get_def, ck_get_defyn, ck_get_defen
  3016.  
  3017.  
  3018.                                                                  Functions
  3019.  
  3020.        ck_dos_shell                              high level
  3021.        -------------------------------------------------------------------
  3022.        Summary:       #include "ckit.h"
  3023.                       short ck_dos_shell(char *, char *);
  3024.  
  3025.        Description:   Will execute program pointed arg1, arg2 is passed
  3026.                       as command line arguments to the program.
  3027.                       arg2 must be < 128 chars. (DOS limit).
  3028.                       This function uses spawnlp() to execute the program.
  3029.                       If you plan on doing any shells, you need to use this
  3030.                       function since it will disable the keyboard timer
  3031.                       while the shell is taking place and perform some other
  3032.                       clean up's upon re-entry.  This call uses C's
  3033.                       spawnlp() function, as P_WAIT.
  3034.  
  3035.        Return Value:  -1 = error (check 'C's GLOBAL _errno), NULL = NO error
  3036.  
  3037.        See also: F5 local shell to DOS, and CKITDEMO.C
  3038.  
  3039.        Example:  Download a file using Zmodem taken from CKITDEMO.C
  3040.  
  3041.    #include "ckit.h"
  3042.  
  3043.    char    zmodem_cmds[128];     /* Buffer to build Zmodem command   */
  3044.  
  3045.    main(int argc, char **argv) {
  3046.      if (argc > 1) {
  3047.        ck_open_door(argv[1]);
  3048.        .
  3049.        .
  3050.        .
  3051.     color(green);
  3052.     s_printf("\nReady to send %s. Press <ENTER> to begin.",doc_filename);
  3053.     while(DUMP_USER != TRUE) {
  3054.           if( check_CR() ) {
  3055.             break;
  3056.         }
  3057.     }
  3058.    sprintf(zmodem_cmds, "portx %X,%X pB4096 pa3000 handshake cts sz %s", \
  3059.             uart_base, irq, doc_filename);
  3060.     if(dos_shell("dsz", zmodem_cmds)) {
  3061.         s_puts("\n\aTransfer aborted");
  3062.     } else {
  3063.         s_puts("\nTransfer complete");
  3064.     }
  3065.        .
  3066.        .
  3067.        .
  3068.        ck_close_door();
  3069.      };
  3070.    };
  3071.  
  3072.  
  3073.                                                                  Functions
  3074.  
  3075.        ck_display_file                           high level
  3076.        -------------------------------------------------------------------
  3077.        Summary:      #include "ckit.h"
  3078.                      short ck_display_file(char *);
  3079.  
  3080.        Description:  Displays file to local/remote consoles.  Automatic
  3081.                      use of page_length, control K checks, MORE? prompting,
  3082.                      closes file when done. Expects a pointer to name/path
  3083.                      of file to display.  If page_length is 0, the
  3084.                      MORE? prompting will be disabled.  You can use this
  3085.                      to your advantage for files that you do not want
  3086.                      MORE? prompting by setting ck_userpage_length to 0 before
  3087.                      calling display_file().  Just make sure you save the
  3088.                      original value of ck_userpage_length if you need it later
  3089.                      on. This function will not automatically attempt to
  3090.                      display a graphic file if the user is in graphics.
  3091.                      For display non-interruptable menus, set page_length
  3092.                      to NULL before calling this function.
  3093.                      It is up to the door author to decide how he wants
  3094.                      to handle it. see below.  This call is done to
  3095.                      the Borland _open() or MSC _dos_open() libraries as
  3096.                      _open(filename, O_RDONLY | O_DENYNONE);
  3097.                      (share compatible mode)
  3098.  
  3099.        Return Value: Returns  non-zero if error.  If desired, you can then
  3100.                      check the C global _errno for the cause of the problem.
  3101.  
  3102.        See Also:     NONE
  3103.  
  3104.        Example:      This example displays the file ckit.m, then forces
  3105.                      user to press enter when done.
  3106.  
  3107.        #include "ckit.h"
  3108.        main(int argc, char **argv) {
  3109.          if (argc > 1) {
  3110.            ck_open_door(argv[1]);
  3111.            .
  3112.            .
  3113.            .
  3114.            strcpy(filename, "ckit.m")
  3115.            if(!ck_graphics) {
  3116.                (ck_display_file(filename);
  3117.             } else {
  3118.                 strcat(filename,"g");
  3119.                (ck_display_file(filename);
  3120.             }
  3121.            ck_force_enter();
  3122.            .
  3123.            .
  3124.            .
  3125.          };
  3126.          ck_close_door();
  3127.        };
  3128.  
  3129.                                                                  Functions
  3130.  
  3131.        ck_debug_on                               high level
  3132.        -------------------------------------------------------------------
  3133.        Summary:       #include "ckit.h"
  3134.                       void ck_debug_on(void); alias ck_carrier_on();
  3135.  
  3136.        Description:   A call to this function while debugging your door
  3137.                       will disable the keyboard timer among other things
  3138.                       while you are trying to debug your door.  Make
  3139.                       sure you remove this call before releasing your door
  3140.                       or the keyboard timeout will not function!  It should
  3141.                       only be called after open_door();.  This can also
  3142.                       be used if needed to use transmit_modem() while the
  3143.                       door is opened. This will disable ck_DUMP_USER from
  3144.                       going true.  Make sure you turn debug back on!
  3145.                       using debug_off();
  3146.  
  3147.        Return Value:  NONE
  3148.  
  3149.  
  3150.        Example:
  3151.  
  3152.        #include "ckit.h"
  3153.        main(int argc, char **argv) {
  3154.          if (argc > 1) {
  3155.            ck_open_door(argv[1]);
  3156.            .
  3157.            .
  3158.            .
  3159.            ck_debug_on();
  3160.            ck_lower_dtr();    /* Drop user off           */
  3161.            ck_raise_dtr();
  3162.            ck_wait(1);        /* wait for modem to reset */
  3163.            ck_flush_RQUEUE(); /* Flush receive queue     */
  3164.            ck_transmit_modem("ATDT6159826537");
  3165.            ck_debug_off();
  3166.            while(ck_tqueue_len()); /* wait on modem */
  3167.            ck_newline();
  3168.            delay(1);
  3169.            while(ck_DUMP_USER != TRUE) { /* wait for modem */
  3170.              ck_get_cmdline();
  3171.              ck_newline();
  3172.              ck_s_putv("Modem returned -> ",cmdline, NULL);
  3173.              break;
  3174.            };
  3175.            .
  3176.            .
  3177.            .
  3178.          };
  3179.          ck_close_door();
  3180.        };
  3181.  
  3182.  
  3183.                                                                  Functions
  3184.  
  3185.        ck_debug_off                              high level
  3186.        -------------------------------------------------------------------
  3187.        Summary:       #include "ckit.h"
  3188.                       void ck_debug_on(void); alias ck_carrier_off();
  3189.  
  3190.        Description:   After a call to debug_on(), this will re-enable
  3191.                       keyboard timer, etc.
  3192.                       It should only be called after open_door();
  3193.  
  3194.        Return Value:  NONE
  3195.  
  3196.  
  3197.        Example:
  3198.  
  3199.        #include "ckit.h"
  3200.        main(int argc, char **argv) {
  3201.          if (argc > 1) {
  3202.            ck_open_door(argv[1]);
  3203.            ck_debug_on();  /* while debugging door */
  3204.            .
  3205.            .
  3206.            .
  3207.          };
  3208.          ck_debug_off();
  3209.          ck_close_door();
  3210.        };
  3211.  
  3212.  
  3213.  
  3214.                                                                  Functions
  3215.  
  3216.        ck_input                                  intermediate level
  3217.        -------------------------------------------------------------------
  3218.        Summary:       #include "ckit.h"
  3219.                       void ck_input(BYTE *, short);
  3220.  
  3221.        Description:   Read a line of input with specified length. Echo to
  3222.                       screen, leave cursor after the last key typed before
  3223.                       C/R. Automatically checks for time_left, carrier.
  3224.                       Expects a char array pointer to store input and max.
  3225.                       length of input to read.  NOTE: Each call to input()
  3226.                       will purge the buffer in use to NULLS.  MAX length
  3227.                       must not exceed the size of your array and it must
  3228.                       not include the NULL char. (sizeof(array) - 1).
  3229.                       It will also set key_source = 1 or 2. Setting
  3230.                       ck_DOTS = char will cause char to be echoed to the
  3231.                       local/remote consoles.
  3232.  
  3233.        Return Value:  No value is returned.
  3234.  
  3235.        See Also:      ck_get_cmdline(), ck_inkey(), ck_getkey(), ck_key_source
  3236.                       ck_wait_keypress(), ck_check_CTRL_K
  3237.  
  3238.        Example:       This example reads keyboard input from local/remote
  3239.                       console into array usr_input[] with max. bytes to
  3240.                       read equal to 100 bytes. Will set key_source
  3241.                       equal to source of input.
  3242.  
  3243.        NOTE:          This a "intermediate" level function.  You would not
  3244.                       normally need to use this function.  get_cmdline();
  3245.                       would normally be used and will handle all input
  3246.                       for you.
  3247.  
  3248.  
  3249.        #include "ckit.h"
  3250.        main(int argc, char **argv) {
  3251.          if (argc > 1) {
  3252.            ck_open_door(argv[1]);
  3253.            .
  3254.            .
  3255.            .
  3256.            ck_input(&usr_input[0], sizeof(usr_input) - 1);
  3257.            .
  3258.            .
  3259.            .
  3260.            ck_close_door();
  3261.          };
  3262.        };
  3263.  
  3264.                                                                  Functions
  3265.  
  3266.        ck_check_time_left                        intermediate level
  3267.        -------------------------------------------------------------------
  3268.        Summary:       #include "ckit.h"
  3269.                       void ck_check_time_left(void);
  3270.  
  3271.        Description:   Checks time left on system, automatically sets
  3272.                       ck_DUMP_USER if time expired.  Should be included
  3273.                       in all major program loops if you are going to use it.
  3274.  
  3275.        Return Value:  NONE
  3276.  
  3277.        See Also:      display_time, ck_get_cmdline
  3278.  
  3279.        Example:       This function is normally handled by get_cmdline()
  3280.                       and input().  You do not normally need to use it.
  3281.  
  3282.        #include "ckit.h"
  3283.  
  3284.        main(int argc, char **argv) {
  3285.          if (argc > 1) {
  3286.            ck_open_door(argv[1]);
  3287.            .
  3288.            .
  3289.            .
  3290.            ck_check_time_left();
  3291.            if(ck_DUMP_USER == TRUE) {
  3292.              ck_close_door();
  3293.            };
  3294.            .
  3295.            .
  3296.            .
  3297.            ck_close_door();
  3298.          };
  3299.        };
  3300.  
  3301.        ck_mins_left_system                       intermediate level
  3302.        -------------------------------------------------------------------
  3303.        Summary:       #include "ckit.h"
  3304.                       short ck_mins_left_system(void);
  3305.  
  3306.        Description:   Returns the time left in the door, not including
  3307.                       any time_credit given.  Does not set ck_DUMP_USER.
  3308.                       If expired, the time returned will be 0 or
  3309.                       negative minutes.  Does not include any time
  3310.                       credit given in door.
  3311.  
  3312.        Return Value:  short value - minutes remaining in door
  3313.  
  3314.        See Also:      display_time, ck_get_cmdline, time_credit
  3315.  
  3316.        Example:
  3317.  
  3318.        #include "ckit.h"
  3319.  
  3320.        minutes_left;
  3321.        main(int argc, char **argv) {
  3322.          if (argc > 1) {
  3323.            ck_open_door(argv[1]);
  3324.            .
  3325.            .
  3326.            .
  3327.            color(yellow);
  3328.            s_puts("(");
  3329.            color(green);
  3330.            s_printf("%d used, ", system_time_used()+prev_used);
  3331.            color(red);
  3332.            s_printf("%d left",  mins_left_system()+time_credit);
  3333.            color(yellow);
  3334.            s_puts(") ");
  3335.            .
  3336.            .
  3337.            .
  3338.            ck_close_door();
  3339.          };
  3340.        };
  3341.  
  3342.        ck_system_time_used                       intermediate level
  3343.        -------------------------------------------------------------------
  3344.        Summary:       #include "ckit.h"
  3345.                       short ck_system_time_used(void);
  3346.  
  3347.        Description:   Returns the time used in minutes since the
  3348.                       door was opened. Does not set ck_DUMP_USER.
  3349.                       Does not include time prev used in door.
  3350.  
  3351.        Return Value:  short value - minutes used since door opened.
  3352.  
  3353.        See Also:      display_time, prev_used
  3354.  
  3355.        Example:
  3356.  
  3357.        #include "ckit.h"
  3358.  
  3359.        minutes_left;
  3360.        main(int argc, char **argv) {
  3361.          if (argc > 1) {
  3362.            ck_open_door(argv[1]);
  3363.            .
  3364.            .
  3365.            .
  3366.            color(yellow);
  3367.            s_puts("(");
  3368.            color(green);
  3369.            s_printf("%d used, ", system_time_used()+prev_used);
  3370.            color(red);
  3371.            s_printf("%d left",  mins_left_system()+time_credit);
  3372.            color(yellow);
  3373.            s_puts(") ");
  3374.            .
  3375.            .
  3376.            .
  3377.            ck_close_door();
  3378.          };
  3379.        };
  3380.  
  3381.                                                                  Functions
  3382.  
  3383.        ck_adjust_time_allowed                    intermediate level
  3384.        -------------------------------------------------------------------
  3385.        Summary:       #include "ckit.h"
  3386.                       void ck_adjust_time_allowed(short);
  3387.  
  3388.        Description:   Adjust user time left on system. Automatically
  3389.                       updates PCBoard.sys to reflect change.
  3390.                       This function will only be effective on systems
  3391.                       using pcboard.sys.
  3392.  
  3393.        Return Value:  NONE
  3394.  
  3395.        See Also:      
  3396.  
  3397.        Example:  For complete example see CKITDEMO.C included
  3398.  
  3399.        if (ck_get_nextpar()) {  /* scan next parameter from cmdline into par */
  3400.         if (!strcmpi(thinking_of, par)) {
  3401.             ck_color(green);
  3402.             ck_s_puts("That's right!  You get a 10 minute bonus!");
  3403.             ck_adjust_time_allowed(10);
  3404.         } else {
  3405.            ck_color(blue);
  3406.            ck_s_putv("Wrong! You lose 2 minutes! \
  3407.                    I was thinking of ", thinking_of,".",NULL);
  3408.                   adjust_time_allowed(-2);
  3409.         }
  3410.       }
  3411.  
  3412.  
  3413.                                                                  Functions
  3414.  
  3415.        ck_check_event                            intermediate level
  3416.        -------------------------------------------------------------------
  3417.        Summary:       #include "ckit.h"
  3418.                       short ck_check_event(void);
  3419.  
  3420.        Description:   Checks if time left will conflict with event.
  3421.  
  3422.        Return Value:  0 if no conflict, otherwise it will return the
  3423.                       minutes left before event.
  3424.  
  3425.  
  3426.        See Also:      ck_event_minutes, ck_mins_before_event.
  3427.  
  3428.        EXAMPLE:      C-KIT will automatically check for event conflicts.
  3429.                      This function would normally not be used.
  3430.  
  3431.  
  3432.  
  3433.                                                                  Functions
  3434.  
  3435.        ck_event_minutes                          intermediate level
  3436.        -------------------------------------------------------------------
  3437.        Summary:       #include "ckit.h"
  3438.                       short ck_event_minutes(void);
  3439.  
  3440.        Description:   Checks minutes past midnight event is scheduled.
  3441.                       This function is normally handled by C-KIT.
  3442.                       This function would normally not be used.
  3443.  
  3444.        Return Value:  Number of minutes past midnight event is scheduled
  3445.                       to run.
  3446.  
  3447.        See Also:      ck_check_event, ck_mins_before_event.
  3448.  
  3449.        #include "ckit.h"
  3450.  
  3451.        main(int argc, char **argv) {
  3452.          if (argc > 1) {
  3453.            ck_open_door(argv[1]);
  3454.            .
  3455.            .
  3456.            .
  3457.            ck_short   event_mins;
  3458.            ck_event_mins = event_minutes();
  3459.            .
  3460.            .
  3461.            .
  3462.            ck_close_door();
  3463.          };
  3464.        };
  3465.  
  3466.  
  3467.  
  3468.                                                                  Functions
  3469.  
  3470.        ck_mins_before_event                      intermediate level
  3471.        -------------------------------------------------------------------
  3472.        Summary:       #include "ckit.h"
  3473.                       short ck_mins_before_event(void);
  3474.  
  3475.        Description:   Check minutes left before event from current time.
  3476.  
  3477.        Return Value:  Minutes before event from current time.
  3478.  
  3479.        See Also:      ck_check_event, ck_event_minutes.
  3480.  
  3481.        Example:
  3482.  
  3483.        #include "ckit.h"
  3484.  
  3485.        main(int argc, char **argv) {
  3486.          if (argc > 1) {
  3487.            ck_open_door(argv[1]);
  3488.            .
  3489.            .
  3490.            .
  3491.            short  mins_before_event;
  3492.            mins_before_event = ck_mins_before_event();
  3493.            .
  3494.            .
  3495.            .
  3496.            ck_close_door();
  3497.          };
  3498.        };
  3499.  
  3500.  
  3501.                                                                  Functions
  3502.  
  3503.        ck_delay                                  intermediate level
  3504.        -------------------------------------------------------------------
  3505.        Summary:       #include "ckit.h"
  3506.                       void ck_delay(short);
  3507.  
  3508.        Description:   General purpose delay in milliseconds
  3509.                       Minumum of 55 ms.  (short must be >= 1)
  3510.                       This function is good only on the MSC librarys.
  3511.                       The TURBO librarys use Borland's DELAY() function.
  3512.  
  3513.        See also:      ck_wait
  3514.  
  3515.        Return Value:  NONE
  3516.  
  3517.  
  3518.  
  3519.  
  3520.                                                                  Functions
  3521.  
  3522.        ck_wait                                   intermediate level
  3523.        -------------------------------------------------------------------
  3524.        Summary:       #include "ckit.h"
  3525.                       void ck_wait(short);
  3526.  
  3527.        Description:   General purpose delay in seconds
  3528.                       Minumum of 1 sec. for now  (short must be >= 1)
  3529.                       less than one will result in 1/2 second delay.
  3530.                       Use ck_delay above
  3531.  
  3532.  
  3533.        Return Value:  NONE
  3534.  
  3535.        See also:      ck_delay
  3536.  
  3537.  
  3538.  
  3539.                                                                  Functions
  3540.  
  3541.        ck_purge_buffer                           intermediate level
  3542.        -------------------------------------------------------------------
  3543.        Summary:       #include "ckit.h"
  3544.                       void ck_purge_buffer(BYTE *, short);
  3545.  
  3546.        Description:   purge_buffer will purge any buffer to NULLS by
  3547.                       passing a pointer to the buffer and the size of the
  3548.                       buffer. i.e purge_buffer(buffer, 0x80).
  3549.                       This may or may not be useful but is available.
  3550.  
  3551.            NOTE: There is a seperate purge function for the serial port
  3552.            input buffer if you wish to purge it before calling input.
  3553.            See flush_RQUEUE.
  3554.  
  3555.        Return Value:  NONE
  3556.  
  3557.        See also: flush_RQUEUE
  3558.  
  3559.        Example:
  3560.  
  3561.        #include "ckit.h"
  3562.  
  3563.        static BYTE buff[256] = "This is purge buffer test";
  3564.  
  3565.        main(int argc, char **argv) {
  3566.          if (argc > 1) {
  3567.            ck_open_door(argv[1]);
  3568.            .
  3569.            .
  3570.            .
  3571.            ck_purge_buffer(buff, 255);
  3572.            .
  3573.            .
  3574.            .
  3575.            ck_close_door();
  3576.          };
  3577.        };
  3578.  
  3579.  
  3580.  
  3581.                                                                  Functions
  3582.  
  3583.        ck_check_CR                               intermediate level
  3584.        -------------------------------------------------------------------
  3585.        Summary:       #include "ckit.h"
  3586.                       void short ck_check_CR(void);
  3587.  
  3588.        Description:   Check for a carriage return, does not wait, does
  3589.                       not display any prompts.
  3590.                       Returns TRUE or FALSE
  3591.  
  3592.        Return Value:  TRUE, FALSE
  3593.  
  3594.        See also: ck_force_enter(), ck_get_cmdline(), ck_check_keypress()
  3595.  
  3596.  
  3597.  
  3598.                                                                  Functions
  3599.  
  3600.        ck_check_CTRL_K                           intermediate level
  3601.        -------------------------------------------------------------------
  3602.        Summary:       #include "ckit.h"
  3603.                       short ck_check_CTRL_K(void);
  3604.  
  3605.        Description:   Check if a CONTROL K (ASCII 11) has been entered.
  3606.                       Returns TRUE or FALSE
  3607.  
  3608.        Return Value:  TRUE, FALSE
  3609.  
  3610.        See also: ck_CtrlK_OFF, ck_CtrlK_ON
  3611.  
  3612.  
  3613.                                                                  Functions
  3614.  
  3615.        ck_CtrlK_ON                               intermediate level
  3616.        -------------------------------------------------------------------
  3617.        Summary:       #include "ckit.h"
  3618.                       void CtrlK_ON(void);
  3619.  
  3620.        Description:   Enables  CONTROL K (ASCII 11) checking.
  3621.                       This is normally off since most menu types are
  3622.                       non_interruptable.  If turned on, CTRL K will
  3623.                       be recognized.  Once on, you must call CtrlK_OFF()
  3624.                       (see below) to disable it.  CTRL K's are also NOT
  3625.                       put into the input buffer.  You have to use the
  3626.                       check_CTRL_K() function (see above) to determine
  3627.                       if a CTRL K has been pressed.
  3628.  
  3629.        See also:  ck_CtrlK_OFF, ck_check_CTRL_K()
  3630.  
  3631.                                                                  Functions
  3632.  
  3633.        ck_CtrlK_OFF                              intermediate level
  3634.        -------------------------------------------------------------------
  3635.        Summary:       #include "ckit.h"
  3636.                       void ck_CtrlK_OFF(void);
  3637.  
  3638.        Description:   Disables CONTROL K (ASCII 11) checking.
  3639.  
  3640.        See also: ck_CtrlK_ON, ck_check_CTRL_K()
  3641.  
  3642.  
  3643.        ck_set_kybd_time                       intermediate level
  3644.        -------------------------------------------------------------------
  3645.        Summary:       #include "ckit.h"
  3646.                       void ck_set_kybd_time(BYTE, BYTE);
  3647.  
  3648.        Description:   Sets keyboard timer to desired values.
  3649.                       Default is 2 minutes beep and 5 minute timeout.
  3650.  
  3651.         This allows the door author to set the keyboard timer.  The
  3652.         time has a resolution in minutes, with a minimum of 1 minute
  3653.         and a maximum of 255.  The routine expects two numbers.  The
  3654.         first number is the BEEP time.  This sets how many minutes
  3655.         should pass before the keyboard timer gives a warning beep.
  3656.         It will continue to beep afterwards at one  minute intervals.
  3657.         The second number is the actual keyboard timeout value.  It
  3658.         should normally be set to some number higher than the BEEP time.
  3659.         NOTE: Each call to ck_set_kybd_time() will reset the current
  3660.         keyboard timer to zero.
  3661.  
  3662.         Example: Set the BEEP time to 2 minutes and timeout to 6 minutes.
  3663.  
  3664.        #include "ckit.h"
  3665.  
  3666.        main(int argc, char **argv) {
  3667.          if (argc > 1) {
  3668.            ck_open_door(argv[1]);
  3669.            .
  3670.            .
  3671.            .
  3672.            ck_set_kybd_time(2, 6);
  3673.            .
  3674.            .
  3675.            .
  3676.            ck_close_door();
  3677.          };
  3678.        };
  3679.  
  3680.  
  3681.                                                                  Functions
  3682.  
  3683.         NOTE:  ALL the low level functions below are not normally
  3684.                needed and are handled automatically by C-KIT in a
  3685.                higher level function.  Most of these functions
  3686.                do NO carrier detects, etc.  They are only provided
  3687.                in special cases that may need them.  Use with caution.
  3688.  
  3689.        ck_inkey                                  low level
  3690.        -------------------------------------------------------------------
  3691.        Summary:       #include "ckit.h"
  3692.                       BYTE ck_inkey(void);
  3693.  
  3694.        Description:   Read character (if available) from local/remote
  3695.                       console.  Does not wait for input.  Also sets
  3696.                       key_source equal to SYSOP or USER_KEY.  Inkey
  3697.                       will also keep track of time left and set ck_DUMP_USER
  3698.                       if time expires.
  3699.  
  3700.        Return Value:  Returns 0 if none available, otherwise returns key
  3701.                       pressed
  3702.  
  3703.        See Also:      input, sio_getbyte, key_source above in globals,
  3704.                       check_CTRL_K
  3705.  
  3706.        Example:       This example checks for A at the keyboard,
  3707.                       from local/remote console, returns TRUE or FALSE
  3708.  
  3709.        #include "ckit.h"
  3710.  
  3711.        main(int argc, char **argv) {
  3712.          if (argc > 1) {
  3713.            ck_open_door(argv[1]);
  3714.            .
  3715.            .
  3716.            .
  3717.            if ( ck_inkey() != 'A') {
  3718.               return(FALSE);
  3719.            } else {
  3720.               return(TRUE);
  3721.            }
  3722.            .
  3723.            .
  3724.            .
  3725.            ck_close_door();
  3726.          };
  3727.        };
  3728.  
  3729.  
  3730.                                                                  Functions
  3731.  
  3732.        ck_keystat                                low level
  3733.        -------------------------------------------------------------------
  3734.        Summary:       #include "ckit.h"
  3735.                       short ck_keystat(void);
  3736.  
  3737.        Description:   Check if character is available from local console.
  3738.                       Does not wait for input.
  3739.  
  3740.        Return Value:  Returns 0 if none available.  None-zero if available.
  3741.  
  3742.        See Also:      ck_input, ck_r_count, ck_key_source.
  3743.  
  3744.        Example:       This example checks for keypress at the keyboard
  3745.                       local console, returns TRUE or FALSE
  3746.  
  3747.        #include "ckit.h"
  3748.  
  3749.        main(int argc, char **argv) {
  3750.          if (argc > 1) {
  3751.            ck_open_door(argv[1]);
  3752.            .
  3753.            .
  3754.            .
  3755.            if ( ck_keystat() ) {
  3756.               return(FALSE);
  3757.            } else {
  3758.               return(TRUE);
  3759.            }
  3760.            .
  3761.            .
  3762.            .
  3763.            ck_close_door();
  3764.          };
  3765.        };
  3766.  
  3767.  
  3768.                                                                  Functions
  3769.  
  3770.        ck_r_count                                low level
  3771.        -------------------------------------------------------------------
  3772.        Summary:       #include "ckit.h"
  3773.                       short ck_r_count(void);
  3774.  
  3775.        Description:   Returns number of characters in receive queue.
  3776.                       Does not wait for input.
  3777.  
  3778.        Return Value:  Returns NULL if none available else returns number
  3779.                       of characters in the recieve queue.
  3780.  
  3781.        See Also:      ck_input, ck_r_count, ck_keystat.
  3782.  
  3783.        Example:       See ck_flush_rqueue below
  3784.  
  3785.  
  3786.  
  3787.                                                                  Functions
  3788.  
  3789.        ck_getkey                                 low level
  3790.        -------------------------------------------------------------------
  3791.        Summary:       #include "ckit.h"
  3792.                       size_t ck_getkey(void);
  3793.  
  3794.        Description:   Read character (if available)  from local console.
  3795.                       Does not wait for input.
  3796.  
  3797.        Return Value:  Returns FALSE if none available.
  3798.  
  3799.        See Also:      ck_input, ck_getkey, ck_keystat, ck_check_CTRL_K
  3800.  
  3801.        Example:       This example read key from local console buffer and
  3802.                       print to screen.
  3803.  
  3804.        #include "ckit.h"
  3805.  
  3806.        size_t ch;
  3807.  
  3808.        main(int argc, char **argv) {
  3809.          if (argc > 1) {
  3810.            ck_open_door(argv[1]);
  3811.            .
  3812.            .
  3813.            .
  3814.            ch = getkey();
  3815.            ck_s_putc(ch);
  3816.            .
  3817.            .
  3818.            .
  3819.            ck_close_door();
  3820.          };
  3821.        };
  3822.  
  3823.  
  3824.  
  3825.                                                                  Functions
  3826.  
  3827.        ck_sio_getbyte                            low level
  3828.        -------------------------------------------------------------------
  3829.        Summary:       #include "ckit.h"
  3830.                       BYTE ck_sio_getbyte(void);
  3831.  
  3832.        Description:   Read character (if available)  from remote console.
  3833.                       Does not wait for input.
  3834.  
  3835.        Return Value:  Returns NULL if none available else returns
  3836.                       character read.
  3837.  
  3838.        See Also:      ck_input, ck_sio_getbyte, ck_keystat, ck_check_CTRL_K
  3839.  
  3840.        Example:       This example reads byte from remote console buffer
  3841.                       and displays it, if one was available.
  3842.  
  3843.        #include "ckit.h"
  3844.  
  3845.        BYTE ch;
  3846.        main(int argc, char **argv) {
  3847.          if (argc > 1) {
  3848.            ck_open_door(argv[1]);
  3849.            .
  3850.            .
  3851.            .
  3852.            ch = ck_sio_getbyte();
  3853.            if(ch) {
  3854.                  ck_s_putc(ch);
  3855.            };
  3856.            .
  3857.            .
  3858.            .
  3859.            ck_close_door();
  3860.          };
  3861.        };
  3862.  
  3863.  
  3864.  
  3865.        ck_lower_dtr                              low level
  3866.        -------------------------------------------------------------------
  3867.        Summary:       #include "ckit.h"
  3868.                       void ck_lower_dtr(void);
  3869.  
  3870.        Description:   Drops DTR on com port, causing modem to hang up.
  3871.  
  3872.        Return Value:  NONE
  3873.  
  3874.        See Also:        ck_raise_dtr, ck_transmit_modem, ck_transmit_data
  3875.  
  3876.        Example:
  3877.                         see ck_transmit_modem below
  3878.  
  3879.                                                                  Functions
  3880.  
  3881.  
  3882.        ck_raise_dtr                              low level
  3883.        -------------------------------------------------------------------
  3884.        Summary:       #include "ckit.h"
  3885.                       void ck_raise_dtr(void);
  3886.  
  3887.        Description:   Raises DTR on com port, causing modem to hang up.
  3888.  
  3889.        Return Value:  NONE
  3890.  
  3891.        See Also:        ck_lower_dtr, ck_transmit_modem, ck_transmit_data
  3892.  
  3893.        Example:
  3894.                         see ck_transmit_modem below
  3895.  
  3896.  
  3897.                                                                  Functions
  3898.  
  3899.  
  3900.        ck_force_offhook                          low level
  3901.        -------------------------------------------------------------------
  3902.        Summary:       #include "ckit.h"
  3903.                       void ck_force_offhook(void);
  3904.  
  3905.        Description:   Drops DTR on com port, causing modem to hang up,
  3906.                       tells modem to go back offhook.
  3907.                       This function will wait 1 second after dropping
  3908.                       dtr and 2 seconds after raising DTR before
  3909.                       telling modem to go offhook.  This is normally
  3910.                       handled automatically by C-KIT depeding on the
  3911.                       ck_FORCEOFFHOOK setting.
  3912.  
  3913.        Return Value:  NONE
  3914.  
  3915.        See Also:     ck_FORCEOFFHOOK above.
  3916.  
  3917.        Example:      Send a string to reset the modem if carrier
  3918.                      is lost.
  3919.  
  3920.        #include "ckit.h"
  3921.  
  3922.        main(int argc, char **argv) {
  3923.          if (argc > 1) {
  3924.            ck_open_door(argv[1]);
  3925.            .
  3926.            .
  3927.            .
  3928.            ck_force_offhook(); /* Dump user offline */
  3929.            .
  3930.            .
  3931.            .
  3932.          };
  3933.          ck_close_door();
  3934.        };
  3935.  
  3936.  
  3937.                                                                  Functions
  3938.  
  3939.  
  3940.        ck_transmit_data                          low level
  3941.        -------------------------------------------------------------------
  3942.        Summary:       #include "ckit.h"
  3943.                       void ck_transmit_data(BYTE *);
  3944.  
  3945.        Description:   Send C string to remote console.
  3946.                       No echo to local console. Expects a pointer to either
  3947.                       a NULL terminate C string of type BYTE or char.
  3948.                       Check for carrier included.  To send a single byte
  3949.                       use the sample code below.
  3950.  
  3951.        Return Value:  NONE
  3952.  
  3953.        See Also: ck_transmit_modem
  3954.  
  3955.        Example:
  3956.  
  3957.        #include "ckit.h"
  3958.  
  3959.        #define BEEP 0x07
  3960.  
  3961.        static char remote_msg[] = "HELLO";
  3962.  
  3963.        main(int argc, char **argv) {
  3964.          if (argc > 1) {
  3965.            ck_open_door(argv[1]);
  3966.            .
  3967.            .
  3968.            .
  3969.            ck_transmit_data(remote_msg);
  3970.            send_byte(BELL);
  3971.            .
  3972.            .
  3973.            .
  3974.          };
  3975.         ck_close_door();
  3976.        };
  3977.  
  3978. /* To send a single byte to the remote only use this code: */
  3979.  
  3980.        void    send_byte(BYTE data) {
  3981.           BYTE byte_out[2];
  3982.           *byte_out = data;
  3983.           *(byte_out+1) = 0x00;         /* Make a 'C' string */
  3984.           transmit_data(byte_out);
  3985.        }
  3986.  
  3987.  
  3988.        ck_transmit_modem                         low level
  3989.        -------------------------------------------------------------------
  3990.        Summary:       #include "ckit.h"
  3991.                       short ck_transmit_modem(BYTE *);
  3992.  
  3993.        Description:   Send C string to modem/remote.
  3994.                       No echo to local console. Expects a pointer to either
  3995.                       a NULL terminate C string of type BYTE or char.
  3996.                       NO carrier checking is included.  If it returns
  3997.                       Non-Zero if error occured, otherwise it returns NULL.
  3998.  
  3999.        Return Value:  NONE
  4000.  
  4001.        See Also: ck_transmit_data
  4002.  
  4003.        Example:
  4004.  
  4005.        #include "ckit.h"
  4006.  
  4007.        static char dialnumber[] = "ATDT6159707418";
  4008.        #include "ckit.h"
  4009.        main(int argc, char **argv) {
  4010.          if (argc > 1) {
  4011.            ck_open_door(argv[1]);
  4012.            .
  4013.            .
  4014.            .
  4015.            ck_debug_on();
  4016.            ck_lower_dtr();    /* Drop user off */
  4017.            ck_raise_dtr();
  4018.            ck_wait(1);     /* wait for modem to reset */
  4019.            ck_flush_RQUEUE(); /* Flush receive queue   */
  4020.            ck_transmit_modem(dialnumber);
  4021.            ck_debug_off();
  4022.            while(ck_tqueue_len()); /* wait on modem */
  4023.            ck_get_cmdline();
  4024.            strcmp(ck_cmdline, "CARRIER");
  4025.            .
  4026.            .
  4027.            .
  4028.          };
  4029.          ck_close_door();
  4030.        };
  4031.  
  4032.                                                          Functions
  4033.  
  4034.        ck_tqueue_len                             low level
  4035.        -------------------------------------------------------------------
  4036.        Summary:       #include "ckit.h"
  4037.                       short ck_tqueue_len(void);
  4038.  
  4039.        Description:   Check number of bytes left in Transmit RQUEUE.
  4040.                       Normally this routine is not needed but is available
  4041.                       if needed.
  4042.  
  4043.  
  4044.        Return Value:  Bytes left in XMIT QUEUE
  4045.  
  4046.        See Also:      
  4047.  
  4048.        Example:
  4049.  
  4050.        #include "ckit.h"
  4051.  
  4052.        static char modem_msg[] = "ATX4";
  4053.        main(int argc, char **argv) {
  4054.          if (argc > 1) {
  4055.            ck_open_door(argv[1]);
  4056.            .
  4057.            .
  4058.            .
  4059.            ck_debug_on();
  4060.            ck_transmit_modem(message);
  4061.            while(ck_tqueue_len());
  4062.            ck_debug_off();
  4063.            .
  4064.            .
  4065.            .
  4066.          };
  4067.         ck_close_door();
  4068.        };
  4069.  
  4070.  
  4071.                                                                  Functions
  4072.  
  4073.        ck_flush_RQUEUE                           low level
  4074.        -------------------------------------------------------------------
  4075.        Summary:       #include "ckit.h"
  4076.                       BYTE * ck_flush_RQUEUE(void);
  4077.  
  4078.        Description:   Flush bytes from Receive QUEUE buffer.
  4079.                       Also returns a near pointer to the receive queue buffer.
  4080.  
  4081.        Return Value:  NONE
  4082.  
  4083.        See Also: r_count, tqueue_len
  4084.  
  4085.        Example:
  4086.  
  4087.        #include "ckit.h"
  4088.  
  4089.        static char message[] = "ATH1";
  4090.  
  4091.        main(int argc, char **argv) {
  4092.          if (argc > 1) {
  4093.            ck_open_door(argv[1]);
  4094.            .
  4095.            .
  4096.            .
  4097.           ck_flush_RQUEUE();         /* flush buffer */
  4098.           ck_transmit_modem(message);
  4099.           while (ck_r_count());      /* wait for response back */
  4100.            .
  4101.            .
  4102.            .
  4103.          };
  4104.         ck_close_door();
  4105.        };
  4106.  
  4107.  
  4108.                                                                  Functions
  4109.  
  4110.        ck_flush_TQUEUE                           low level
  4111.        -------------------------------------------------------------------
  4112.        Summary:       #include "ckit.h"
  4113.                       void ck_flush_TQUEUE(void);
  4114.  
  4115.        Description:   Flush bytes from Transmit QUEUE buffer.
  4116.  
  4117.        Return Value:  NONE
  4118.  
  4119.        See Also: tqueue_len
  4120.  
  4121.        Example:
  4122.  
  4123.        #include "ckit.h"
  4124.  
  4125.        static char message[] = "ATH1";
  4126.  
  4127.        main(int argc, char **argv) {
  4128.          if (argc > 1) {
  4129.            ck_open_door(argv[1]);
  4130.            .
  4131.            .
  4132.            .
  4133.           ck_flush_RQUEUE();         /* flush buffer */
  4134.           ck_transmit_modem(message);
  4135.           while (ck_r_count());      /* wait for response back */
  4136.            .
  4137.            .
  4138.           ck_flush_TQUEUE();         /* flush buffer */
  4139.            .
  4140.          };
  4141.         ck_close_door();
  4142.        };
  4143.  
  4144.  
  4145.                                                                  Functions
  4146.  
  4147.        ck_check_cd                               low level
  4148.        -------------------------------------------------------------------
  4149.        Summary:       #include "ckit.h"
  4150.                       BYTE ck_check_cd(void);
  4151.  
  4152.        Description:   Checks if carrier present. If present, returns
  4153.                       NON-zero.  Zero (NULL) means no carrier present.
  4154.  
  4155.        Return Value:  BYTE indicator of carrier present.
  4156.  
  4157.        See Also: ck_DUMP_USER, ck_transmit_data, ck_transmit_modem
  4158.  
  4159.  
  4160.                                                                  Functions
  4161.  
  4162.        ck_check_keypress                         low level
  4163.        -------------------------------------------------------------------
  4164.        Summary:       #include "ckit.h"
  4165.                       short ck_check_keypress(BYTE);
  4166.  
  4167.        Description:   Check for any specific ASCII character entered.
  4168.                       Does not wait for a character.
  4169.  
  4170.                         This function may or may not be useful
  4171.                         but is available if needed for a "hot_key"
  4172.                         function in a door.  Does no carrier checking!
  4173.  
  4174.        Return Value:  TRUE, FALSE
  4175.  
  4176.        See also: ck_check_CR, ck_input(), ck_getkey()
  4177.                  ck_wait_keypress, ck_check_CTRL_K
  4178.  
  4179.        Example:
  4180.  
  4181.        #include "ckit.h"
  4182.  
  4183.        BYTE result;
  4184.  
  4185.        main(int argc, char **argv) {
  4186.          if (argc > 1) {
  4187.            ck_open_door(argv[1]);
  4188.            .
  4189.            .
  4190.            .
  4191.            while {
  4192.              !(result = ck_check_keypress(0x41));
  4193.            };
  4194.            printf("Keypress returned %d", result);
  4195.            .
  4196.            .
  4197.            .
  4198.          };
  4199.         ck_close_door();
  4200.        };
  4201.  
  4202.  
  4203.  
  4204.  
  4205.  
  4206.   C-KIT based DOOR programs have many of the feature available for the
  4207. door author, and for the sysop using standard function keys such as:
  4208.  
  4209.              Function key
  4210.              ------------
  4211.                 F5              Shell to DOS
  4212.                 F8              Return user to system
  4213.                 F9              Toggle display on/off
  4214.                 F10             Chat mode  (use the ESCAPE key to exit)
  4215.               * F3              Toggle printer on/off
  4216.               * F4              Toggle pagebell on/off
  4217.               * F7              Toggle caller alarm on/off
  4218.  
  4219.              Alternate key
  4220.              -------------
  4221.                ALT-H            Toggle between different status lines
  4222.  
  4223.              * ALT-N            Toggle sysop on next
  4224.              * ALT-X            Toggle exit to dos after call
  4225.                                 and help lines
  4226.         Alternately pressing the ALT-H key will bring up
  4227.         the next status line screen.  The 1st screen is a help screen,
  4228.         the second second screen shows your COM port status.
  4229.  
  4230.  * The function keys marked with an "*"  will only be of use to systems
  4231.    using pcboard.sys.  The rest are functional with any system.
  4232.  
  4233.   Command stacking is also available and can be easily disabled if desired.
  4234. See the CKITDEMO.C for example of disabling command stacking.
  4235.  
  4236.  
  4237.  
  4238.    ATTENTION TURBO C USERS:  In versions 2.01 and below you should use
  4239.    WORD alignment, in C-kit 2.08 and above you should use BYTE alignment.
  4240.    This applies if you are planning to use the ck_users structure AND/OR
  4241.    the ck_update_user() function. The default on BORLAND is BYTE alignment.
  4242.    This will not work correctly for these two items.  If you are not
  4243.    using either the ck_users file structure or ck_update_user();
  4244.    function, then you don't have to use WORD alignment, BYTE alignment
  4245.    will work OK.
  4246.    See the file TCREAD.ME in the CKIT_TC.ZIP file.
  4247.    In addition, TURBO C++/BC++ users should also select standard stack
  4248.    frame alignment.
  4249.    Make a dir to work from. Copy the CKITDEMO.C, CKITDEMO.H, CKIT.H,
  4250.    the CKIT_T?.LIB's, and the TCPPCKIT.PRJ or CKITS.PRJ into the
  4251.    same dir.  Bring up the TURBO C IDE and select the proper project
  4252.    file and you can test the CKITDEMO.C.  Have it create an .exe file.
  4253.    This should get you started.   You can take it from here...
  4254.  
  4255.    This package can be freely distributed so long as it is not modified
  4256.    or sold for profit.  If you find that this program is valuable,  you 
  4257.    can  send me a donation for what you think it is worth.   I  suggest 
  4258.    at least $30.00 (USA exchange).   You will receive a program CKITREG.EXE.
  4259.    This  will register all future copies of C-KIT with your registration
  4260.    number. This means you would only have to download the new versions
  4261.    from your favorite board, saving you long distance charges!
  4262.    Source code modules are available to registered users for reading
  4263.    other system files that you may want to include in your door program.
  4264.    (as they become available).  There is now a complete set of PCBoard
  4265.    source code modules. (users.sys, pcboard.dat etc)
  4266.  
  4267.    Send your contributions to:
  4268.  
  4269.       Rickie W. Belitz
  4270.       P.O. Box 5895
  4271.       Maryville, TN 37802-5895
  4272.  
  4273.                                  SUPPORT
  4274.                                -----------
  4275.  
  4276.    If you have any questions, suggestions, or bug reports, contact me at:
  4277.  
  4278.        Data-Comp BBS
  4279.        (615) 982-6512  (USR HST Dual Standard V.32bis)
  4280.  
  4281.  
  4282.    I can also be reached via mail networks thru INTELEC's BBS_DOORS conference
  4283.    and RIME's (Relaynet) DOORS conference.
  4284.  
  4285.  
  4286.                                ACKNOWLEDGEMENTS
  4287.                              --------------------
  4288.         I would like to give special thanks to my Co-sysop, Dean McGuire,
  4289.         who has patiently tested the door routines and for help preparing the
  4290.         documentation.
  4291.  
  4292.                                   GENERIC.SYS
  4293.                           --------------------------
  4294.    For maximum compatibility, C-KIT will also read a file called
  4295. GENERIC.SYS.  This file can be created by the sysop desiring to run
  4296. the door and allow C-KIT to operate.  This would allow your door to
  4297. operate on ANY BBS system.  (see compatibilty issues below).  The
  4298. GENERIC.SYS file is a standard ASCII file and contains 3 lines, each
  4299. followed by a carriage return, line feed.  The format is:
  4300.  
  4301.         line 1  -  The BBS operator's name.
  4302.         line 2  -  The COM port in use.
  4303.         line 3  -  Time allowed in door.
  4304.  
  4305. Below is an example GENERIC.SYS file with a sysop name of Rickie,
  4306. using Com port 1, and allowing 50 minutes in the door.
  4307.  
  4308. Rickie
  4309. COM1:
  4310. 50
  4311.  
  4312.   Each line is followed by a C/R, L/F and the com port follows the same
  4313. format as the standard door.sys.  COM0: = Local Mode (same as door.sys)
  4314. See the compatibilty issues below for more information.
  4315.  
  4316. NOTE: You should include this information in your door documentation also.
  4317.  
  4318.  
  4319.  
  4320.                              COMPATIBILITY ISSUES
  4321.                           --------------------------
  4322.    Although C-KIT makes a lot information available to the user, the author
  4323.  has to decide on what particular information his or her door will require.
  4324.  Here are some general guidelines that may help.  Decide on exactly what
  4325.  information your door will need to operate.  Keeping this to a minimum
  4326.  increases your chances of maintaining compatibility thruout the different
  4327.  BBS's systems and versions thereof which C-KIT supports.
  4328.  
  4329.    For example, let's assume you are designing a standard BBS game.  C-KIT
  4330.  handles all the detailed information such as time left, carrier detect etc.
  4331.  All you would really need is some basic information.  Perhaps just the
  4332.  user's name and sysop name.   By keeping this type of information to the
  4333.  minimum, your door would work regardless of whether the sysop running your
  4334.  door used pcboard.sys, door.sys, callinfo.bbs or GENERIC.SYS on the command
  4335.  line..i.e,  game.exe c:\pcb\pcboard.sys OR game.exe c:\pcb\door.sys OR
  4336.  game.exe c:\wc\callinfo.bbs, OR game.exe c:\GENERIC.SYS OR
  4337.  game.exe c:\rbbs\DORINFOx.DEF;,  ANY  of these would work.  (If the sysop
  4338.  was running PCBoard 12.0, he would only be able to use pcboard.sys.
  4339.  In this case, C-KIT would not only take care of deciding if it was a
  4340.  pcboard.sys file, door.sys file, WILDCAT! callinfo.bbs or DORINFOx.DEF, but
  4341.  also if it *is* a pcboard.sys file, whether it is a PCBoard 12.0 sys file
  4342.  or later, and then would read it properly!).   This would make your door
  4343.  compatible with the full spectrum of PCBoard 12.0-14.5, WILDCAT!, GAP,
  4344.  SPITFIRE 3.0, other systems using the standard door.sys file, RBBS and
  4345.  others using DORINFO1.DEF and ANY BBS using GENERIC.SYS with minimum effort
  4346.  on the part of the sysop running your door.  Once you've written this
  4347.  fantastic new door, if it's a snap for a Sysop to install it, this might
  4348.  make him a bit more inclined to register it, right?
  4349.  
  4350.    Another senario would be if your door needs somewhat more than the basic
  4351.  information.  I would recommend using the variables available in door.sys
  4352.  and WILDCAT! info file in this case.  This would give you the broadest
  4353.  coverage for your door. If you will notice in the variables descriptions
  4354.  in this manual, there is a compatibility list to the right of each variable.
  4355.  This tells you which and what type of information is available to you
  4356.  depending on whether your door found a door.sys, pcboard.sys (and which
  4357.  version of PCBoard), WILDCAT! info file and DORINFOx.DEF file.  Below
  4358.  is a summary and quick guide to each pcboard.sys version, door.sys,
  4359.  WILDCAT!, DORINFOx.DEF info file and which information variables are
  4360.  available with each.
  4361.  
  4362.    If you need EVEN more information, then you can tell C-KIT to open the
  4363.  users file and read information.  Doing so will limit your door to PCBoard
  4364.  systems only.  C-KIT will NOT record any information to the user's file
  4365.  unless a call to update_user has been made.  It will also not record anything
  4366.  to sysop record.
  4367.  
  4368.                   Compatible with...
  4369.                   ----------------------------------------------------------
  4370.     "ck_"         PCBoard.sys
  4371.    Variables      12.0  14.0-14.5  DOOR.SYS  WILDCAT! DORINFOx.DEF GENERIC.SYS
  4372.  --------------   ----  --------   --------  -------  -----------  -----------
  4373.  *conferences                          X         X
  4374.  aport              X     X            X         X      X             X
  4375.  ansi_ng                               X
  4376.  BBSname                                                X
  4377.  bps_open                 X            X         X
  4378.  baud_rate          X     X            X         X      X
  4379.  callalarm          X     X            X
  4380.  current_conf       X     X            X
  4381.  caller_bday                           X         X
  4382.  display            X     X            X         X      X
  4383.  default_color                         X
  4384.  daily_bytes                           X         X
  4385.  daily_files                           X         X
  4386.  download_Kbytes                       X         X
  4387.  door_opened                                     X
  4388.  DOTS               X     X            X         X      X             X
  4389.  dload_total              X            X         X
  4390.  error_connection   X     X            X         X
  4391.  expert             X     X            X         X
  4392.  event_active             X
  4393.  event_slide              X
  4394.  event_time               X            X         X
  4395.  firstname          X     X            X         X      X             X
  4396.  fullname           X     X            X         X      X             X
  4397.  graphics           X     X            X         X      X
  4398.  gen_dir                               X
  4399.  high_msg                                        X
  4400.  key_source         X     X            X         X      X
  4401.  local              X     X            X         X      X
  4402.  logoff_color       X     X            X         X
  4403.  exit_msg           X     X            X         X      X
  4404.  language           X     X
  4405.  last_file_scan     X     X            X         X
  4406.  min_left           X     X            X         X      X             X
  4407.  main_dir                              X
  4408.  max_files                             X
  4409.  max_sec                                         X
  4410.  monitor_type                                    X
  4411.  msgs_left                             X
  4412.  name_in_use                                     X
  4413.  netchat            X     X
  4414.  node                     X            X         X      X
  4415.  NO_FKEYS           X     X            X         X      X             X
  4416.  NOSYSTEM           X     X            X         X      X             X
  4417.  printer            X     X            X
  4418.  protocol           X     X            X         X
  4419.  pagebell           X     X            X
  4420.  password           X     X            X         X
  4421.  page_length        X     X            X         X      X
  4422.  PCB                X     X            X         X      X
  4423.  PCB12              X     X            X         X      X
  4424.  prev_used                X
  4425.  port               X     X            X         X      X
  4426.  parity                                X         X
  4427.  RBBS               X     X            X         X      X             X
  4428.  record_lock                           X
  4429.  scan_code          X     X            X         X      X
  4430.  security_level                        X         X      X
  4431.  silent             X     X            X         X      X             X
  4432.  sysop_next         X     X
  4433.  sysop_name                            X                X             X
  4434.  sysop_alias                           X
  4435.  time_logged        X     X            X         X      X
  4436.  time_on            X     X
  4437.  time_limit         X     X
  4438.  time_added         X     X
  4439.  total_doors                           X
  4440.  user_record        X     X            X         X
  4441.  upload_Kbytes                         X
  4442.  upload_total             X            X         X
  4443.  ck_usercomment1                       X
  4444.  WILDCAT            X     X            X         X      X
  4445.  
  4446.  One last note - There are four variables PCB12, PCB, WILDCAT and GAP.  When
  4447.  C-KIT reads a pcboard.sys file, it will set the PCB variable TRUE.  If the
  4448.  pcboard.sys file it read was a 12.0 file, it will set the PCB12 variable true.
  4449.  If C-KIT finds a WILDCAT system, it will set the variable WILDCAT true.  This
  4450.  may be useful in making adjustments to your program depending on which system
  4451.  file was read (PCB, DOOR.SYS, PCB12, WILDCAT)  and/or if a sysop was running
  4452.  PCBoard 12.0 and you normally expected door.sys or wildcat info file.
  4453.  If C-KIT finds a door.sys file, GAP will be set true.
  4454.  
  4455.  Also, see the users file information earlier in the doc file.  Some of the
  4456.  users structure information is available even if you are just using door.sys.
  4457.  If you do tell C-KIT to open the users file, all the users file information
  4458.  above will be available, if C-KIT finds a version 14.x pcboard.sys.  If it
  4459.  finds a PCBoard 12.0 pcboard.sys file, some, but not all, of the users
  4460.  structure information will be available.  Each member of the users structure
  4461.  is marked to indicate what is available and what is not depending on the
  4462.  things just mentioned.
  4463.  
  4464.  
  4465.                                                                   Warranty
  4466.  
  4467.                                   Warranty
  4468.                                 ------------
  4469.        I make no warranty of any kind, express or implied, including
  4470.        without limitation, any warranties of merchantability and/or
  4471.        fitness for a particular purpose.  I shall not be held liable for
  4472.        any  damages, whether direct, indirect, special or consequential
  4473.        arising from a failure  of this program to operate in the manner
  4474.        desired by the user.  I shall not be held liable for any damage to
  4475.        data or property which may be caused directly or indirectly by the
  4476.        use of this program.
  4477.  
  4478.        In no event will I be held liable for any damages, including (but
  4479.        not limited to) any lost profits, lost savings or other incidental
  4480.        or consequential damages arising out of the use or inability to
  4481.        use this program, or for any claim by any other party.
  4482.  
  4483.        This warranty is governed by the laws of the State of Tennessee.
  4484.  
  4485.  
  4486.                                  ORDER.FRM       v2.54
  4487.                                -------------
  4488.  
  4489.                                    Return to:     Rickie Belitz
  4490.                                                   P.O. Box 5895
  4491.                                                   Maryville, TN 37802-5895
  4492.  
  4493.   Name ______________________________________________________________
  4494.  
  4495.   Company ___________________________________________________________
  4496.  
  4497.   Address ___________________________________________________________
  4498.  
  4499.           ___________________________________________________________
  4500.  
  4501.   Phone _____________________________________________________________
  4502.  
  4503.   Register C-KIT to:  Name____________________________________________
  4504.  
  4505.   Diskette size:  ____ 5.25" acceptable       ____ 3.5" required*
  4506.  
  4507.   Orders outside the USA add $4.00                         _________
  4508.  
  4509.   *Add $2.00 for 3.5"                                      _________
  4510.  
  4511.       Please find enclosed a check or money order for USA $_________
  4512.   ($30.00 suggested) payable to Rickie Belitz.  This shows my support
  4513.   of Shareware products and the Shareware concept.  It also shows my
  4514.   encouragement to help further development of C-KIT.
  4515.  
  4516.       I understand that C-KIT is provided as-is and no warranties of
  4517.   any kind, expressed or otherwise, are included and that I am using
  4518.   it at my own risk.
  4519.  
  4520.   Signed: _________________________________________  Date: _________
  4521.  
  4522.  
  4523.  
  4524.                                  RELEASE HISTORY
  4525.                                -------------------
  4526.                                 see history file
  4527.  
  4528.  
  4529.                           SOME COMMON PROBLEMS/QUESTIONS
  4530.                           ------------------------------
  4531. Q. How can a test my door in "local" mode?
  4532.  
  4533. A. There is a door.sys file included with the C-KIT libraries.
  4534.    The first line in the door.sys file is COM0:.  With accordance
  4535.    to doorsys specs., this specifies "local" mode.  Use this file
  4536.    for testing your doors.  You can modify the door.sys
  4537.    file to also use a com port for online testing.  See the
  4538.    doorsys.txt for more information.  You could also make up a
  4539.    GENERIC.SYS file and use COM0: as the port.  See the section
  4540.    on GENERIC.SYS.
  4541.  
  4542. Q. When linking my code with the library I get a linker error -
  4543.    Unresolved external _progname in CKIT3.ASM.
  4544.  
  4545. A. C-KIT will look for a C string array called progname[21];.  This the
  4546.    name of your door program and will appear at the bottom of the local
  4547.    line.  This is not an option.  You must declare some kind of name
  4548.    for C-KIT to use even if it just a space char if you don't want your
  4549.    progname at the bottom.  See the CKIDEMO.H file for example and
  4550.    the variable progname[] in the doc file.
  4551.  
  4552. Q. When linking your ckitdemo program, I get an error -
  4553.    Unresolved external _random in ckitdemo.c
  4554.  
  4555. A. The Ckitdemo.c door was written to be compiled with either Microsoft C
  4556.    or Turbo C.  As such, there are compiler directives in the CKITDEMO.C
  4557.    file that will take appropriate action depending on the compiler.
  4558.    Therefore, when compiling the CKITDEMO.C program, you must have the
  4559.    statement -DCOMPILER=MICROSOFT or -DCOMPILER=TURBOC on the command
  4560.    line.   This is needed only when compiling the CKITDEMO.C program.
  4561.    It is NOT needed when you are compiling your own door program.
  4562.  
  4563. Q. Do I have to include the -DCOMPILER-MICROSOFT or -DCOMPILER=TURBOC
  4564.    on the command line every time I compile my door program?
  4565.  
  4566. A. No, this was only needed for the CKITDEMO.C source code.  You can
  4567.    also modify the ckitdemo.c and ckitdemo.h file and take the compiler
  4568.    directives out if you like.  Then you would not have to use it when
  4569.    compiling the ckitdemo.c.  (Just make sure you take the right ones
  4570.    out for whichever compiler you are using). Matter fact, the way
  4571.    the defaults are defined in CKITDEMO.C, and CKITDEMO.H you don't
  4572.    need to have the -DCOMPILER=TURBOC when using TURBO C to compile
  4573.    the ckitdemo.c file or using Turbo C's IDE.
  4574.  
  4575. Q. My F4, F3, F7, ALT X, ALT N keys do not do have any effect when
  4576.    returning to the BBS.
  4577.  
  4578. A. These keys are valid only on doors or sysops using the pcboard.sys
  4579.    file.  When the code finds a door.sys or Wildcat! info files, it
  4580.    will make no attempt to update a pcboard.sys file.
  4581.    F5 shell to DOS, F8 return to BBS, F9 screen on/off will work
  4582.    with any system.  Try and write your door so that the sysop
  4583.    can use pcboard.sys if he is a PCBoard sysop but will also run
  4584.    on other systems as well.  Future updates will take into consideration
  4585.    other systems as permitted.  See the compatibility chart above.
  4586.  
  4587. Q. Why all the formfeeds in the documentation?
  4588.  
  4589. A. This is so that people with access to a copier can print them out,
  4590.    run the printed sheets thru the copier and duplex (print on both
  4591.    sides) the sheets into a manual.  If you do not want the form
  4592.    feeds, just do a global replacement with your favorite editor
  4593.    and get rid of them.
  4594.  
  4595. Q. I thought C-KIT required that the users file path be listed also?
  4596.  
  4597. A. NO.  This was used for the CKITDEMO file only. C-KIT
  4598.         library does not care one way or another about the users
  4599.         file being open.  CKITDEMO is also written to work with ANY
  4600.         system.  Ckitdemo is a demostration of how a door can be
  4601.         written to accept any command line given and make adjustments
  4602.         accordingly.  Ckitdemo will accept either:
  4603.         ckitdemo.exe c:\pcb\pcboard.sys c:\pcb\main\users
  4604.         ckitdemo.exe c:\pcb\door.sys
  4605.         ckitdemo.exe c:\wc\callinfo.bbs PORT:03e8:5
  4606.         See the open_door() function for more information.
  4607.  
  4608.  
  4609. Q. Will C-KIT work with any systems users file?
  4610.  
  4611. A. NO.  If you require information from the user file it must be
  4612.         be PCBoard 14.x or PCBoard 12.0.  However, by doing so
  4613.         you will be limiting your door to the number of systems
  4614.         it can be ran on.  I would not recommend using user file
  4615.         info unless your door is being written specifically for
  4616.         PCBoard.  Other system files (pcboard.dat, msgs and
  4617.         other systems users file) will be included in the form of
  4618.         source code at a later date.  This will allow you to
  4619.         link those with the existing C-KIT library functions.
  4620.  
  4621. Q. What baud rates can C-KIT can handle?
  4622.  
  4623. A.     C-KIT can handle ANY baud rate from 50 baud to 230K baud.
  4624.        (these are the baud rates it has been used with).  The highest
  4625.        baud any standard IBM compt. system can produce is 115K
  4626.        baud.  The 230K baud was done on a modified IBM AT by changing
  4627.        the UART's xtal and using 16550A UARTs.
  4628.  
  4629. Q. I'm using MSC 6.0 and when I compile my program I get a message
  4630.    "warning 'NULL' : macro redefinition"?
  4631.  
  4632. A. This is not a problem.  It is actually a carry over from MSC5.1.
  4633.    If you wish, you can remove the line #define NULL = 0 in the CKIT.H
  4634.    header file. MSC 6.0 redefined their NULL assignment in the stdlib.h
  4635.    file which causes this.  You will not get the warning with MSC 5.1
  4636.    or lower and TURBO C.
  4637.  
  4638. Q. I'm using TURBOC and when I compile the small model demo program
  4639.    it works fine.  But when I re-compile using medium model I get
  4640.    stack overflow fixup errors from the linker.
  4641.  
  4642. A. TurboC does not delete and re-compile the CKITDEMO.C module.
  4643.    So when it attempts to link the older small model .obj file you created
  4644.    earlier with the medium library, you will get this error.  When
  4645.    you switch memory models, you must delete the previous .obj file
  4646.    created using the small memory model.  If this happened to be
  4647.    CKITDEMO.C, you would need to delete CKITDEMO.OBJ before changing
  4648.    memory models.
  4649.  
  4650. Q. Some function keys are not trapped locally.
  4651.  
  4652. A. Some keys are reserved on the local keyboard for sysop functions.
  4653.    Try to design your door without using the F3, F4, F5, F7, F8, F9
  4654.    ALT-H, ALT-N, ALT-X.   If you have to use these keys, they can
  4655.    be used by the remote keyboard but just be aware, you would not
  4656.    be able to use them on your local keyboard.
  4657.  
  4658. Q. When linking my program, I get an error -
  4659.    Unresolved external _wait.
  4660.  
  4661. A. This function was renamed to ck_wait in v1.7.  You need to
  4662.    be using the CKIT.h header file.  There was a conflict with
  4663.    one of Borland's library names.
  4664.  
  4665. Q. Why does the user security level somtimes show on the status line
  4666.    and sometimes it doesn't?
  4667.  
  4668. A. PCBoard.sys file does not provide that information.  The security
  4669.    level will only show if you are using door.sys, callinfo.bbs  (WILDCAT!)
  4670.    or you are using pcboard.sys and open the users file.
  4671.    The status line indicators for pagebell, printer and caller alarm
  4672.    will also not show up if you are using door.sys or callinfo.bbs
  4673.    but will if you are using any version of pcboard.sys from 12.0 up.
  4674.  
  4675. Q. Will there be any kind of sign off message from C-KIT after the program
  4676.    is registered?
  4677.  
  4678. A. After C-KIT is registered, the only message displayed when closing the
  4679.    door will be the one you defined using the *ck_logoff_msgs or the
  4680.    default   "Returning to system ...".
  4681.